Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

How to detect NT Username/Logon ID in Infopath?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Gill - 21 Feb 2007 18:35 GMT
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.
Art - 21 Feb 2007 20:35 GMT
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.
J Galloway - 21 Feb 2007 22:40 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.