You need to set up a web service from Active Directory and then create a WSDL
connection to retreive the data.
> Does anyone know of a way to detect a person's NT Username/logon ID on an
> Infopath form?
>
> I would like to read this information directly from Infopath to pass into an
> internal web service and return that output to the form.
Jonathan Gill - 21 Feb 2007 21:13 GMT
When a person opens an Infopath form how do you gather the current user's NT
Logon information?
Even with a web service to Active Directory wouldn't you need to pass
identifying information such as e-mail address or something else to get
output.
The equivalent of something like Request.ServerVariables("LOGON_USER") from
VBScript (our form uses Javascript as the code behind in Infopath though)?
Request.ServerVariables("LOGON_USER") would return something like
microsoft/bgates on a ASP page.
I am looking to obtain this informatin on an Infopath form when the user
opens it from a SharePoint form library.
> You need to set up a web service from Active Directory and then create a WSDL
> connection to retreive the data.
[quoted text clipped - 4 lines]
> > I would like to read this information directly from Infopath to pass into an
> > internal web service and return that output to the form.
In IP2007, it's simple.
1) Create a new textbox control
2) Go to it's properties
2) In the "default value" box, put "userName()" (no quotes)
OK out and preview the form, you should see the username you logged into
your computer with displayed in the textbox.
You can also find the userName() function by clicking the fX button next to
the default value box, going to "all" functionals, and scrolling down the
list to userName()
Hope this helps!
> Does anyone know of a way to detect a person's NT Username/logon ID on an
> Infopath form?
>
> I would like to read this information directly from Infopath to pass into an
> internal web service and return that output to the form.
Jonathan Gill - 21 Feb 2007 22:57 GMT
Is there an equivalent function in Infopath 2003?
> In IP2007, it's simple.
>
[quoted text clipped - 16 lines]
> > I would like to read this information directly from Infopath to pass into an
> > internal web service and return that output to the form.
J Galloway - 21 Feb 2007 23:36 GMT
In IP2003, you can use the webservice/secondary data source as above, or try
this bit of script:
var objWscript;
objWscript = new ActiveXObject("WScript.Network");
XDocument.UI.Alert(objWscript.username);
> Is there an equivalent function in Infopath 2003?
>
[quoted text clipped - 18 lines]
> > > I would like to read this information directly from Infopath to pass into an
> > > internal web service and return that output to the form.