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 / November 2005

Tip: Looking for answers? Try searching our database.

How to get the Windows Login UserID from Infopath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Venkatesh - 25 May 2005 06:52 GMT
Hi, Here we are working with Infopath, sharepoint and Biztalk. All the 3 are
at different locations. The problem iam facing is iam not able to get the
username from the infoptah.

The scenario is something like this. The user will loging to the sharepoint
portal, then he will go to one formlibrary and will click on Fillout form.
Then the Infopath form will open, that time based on the user role i need to
hide/display some of the sections in Infopath. But iam not able to get the
userid from the infopath when it is in network.
Any help regarding this?
Thanks in advance.
Alex [MSFT] - 26 May 2005 21:14 GMT
The simplest way to get the login ID of the person currently filling out
the form is to write a WhoAmI web service, and use it as a secondary
data source in your form:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsr
v/html/httpsecurity.asp

Good luck,
Alex @ Microsoft

-----Original Message-----
From: Venkatesh [mailto:Venkatesh@discussions.microsoft.com]
Posted At: Tuesday, May 24, 2005 10:52 PM
Posted To: microsoft.public.infopath
Conversation: How to get the Windows Login UserID from Infopath
Subject: How to get the Windows Login UserID from Infopath

Hi, Here we are working with Infopath, sharepoint and Biztalk. All the 3
are
at different locations. The problem iam facing is iam not able to get
the
username from the infoptah.

The scenario is something like this. The user will loging to the
sharepoint
portal, then he will go to one formlibrary and will click on Fillout
form.
Then the Infopath form will open, that time based on the user role i
need to
hide/display some of the sections in Infopath. But iam not able to get
the
userid from the infopath when it is in network.
Any help regarding this?
Thanks in advance.
Jim - 31 May 2005 12:52 GMT
Venketesh, did you solve the problem??? If so please share the solution. I
still could not solve the problem
Jamesy - 24 Aug 2005 09:09 GMT
wow! I may finally be able to offer something back!

Assuming that you have access to SQL Server .....

1) Create  dummy database with public access
2) Create a new data connection to the database using windows authentication
and edit the SQL to ;

           select system_user

(You'll be warned that no tree-view can be created, but just OK that)

3) Create a text-field (hidden) and add a rule that if blank set value to
the C* field of the connection that you have just created.

Viola, when the form loads, the field is populated with the users
domain\userid

Jamesy

> Venketesh, did you solve the problem??? If so please share the solution. I
> still could not solve the problem
Sandeep - 09 Nov 2005 20:09 GMT
C# code:

public void OnLoad(DocReturnEvent e)
        {
           
       
setNodeValue("Your Xml path", System.Environment.UserName);

                }
 
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.