C
craigster76
I am trying to obtain the network username when an InfoPath form loads, then
assign that username to a field in the form. I have tried many different
variations of examples that I have found, but none have worked. Below is
some of the code I have tried in the "Sub XDocument_OnLoad(eventObj)" event:
XDocument.DOM.selectSingleNode("/my:myFields/my:field2") = objNet.UserName
XDocument.DOM.selectSingleNode("../my:Username") = objNet.UserName
XDocument.DOM.selectSingleNode("field2").Text = objNet.UserName
Does anyone have any other suggestions?
Thank you in advance for any help you can provide.
Craig
assign that username to a field in the form. I have tried many different
variations of examples that I have found, but none have worked. Below is
some of the code I have tried in the "Sub XDocument_OnLoad(eventObj)" event:
XDocument.DOM.selectSingleNode("/my:myFields/my:field2") = objNet.UserName
XDocument.DOM.selectSingleNode("../my:Username") = objNet.UserName
XDocument.DOM.selectSingleNode("field2").Text = objNet.UserName
Does anyone have any other suggestions?
Thank you in advance for any help you can provide.
Craig