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 / June 2007

Tip: Looking for answers? Try searching our database.

Collecting Username from IE Client when Form is opend from Sharepo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janko - 12 Jun 2007 10:25 GMT
Hi @ all,

I have a more or less bigger problem :)

I would like to find out the username from that person which has opened the
Infopath form by Browser.

I try to do the following in my code:

Public Sub FormEvents_Loading(ByVal sender as Object, ByVal e as
LoadingEventArgs)
.......

  Dim user_id as System.Security.Principal.WindowsIdentity

  If Me.Application.Environment.IsBroser Then
     user_id = System.Security.Principal.WindowsIdentity.GetCurrent
     xpnUser.SetValue(user_id.Name)
  Else
     user = Application.User.LoginName
     xpnUser.SetValue(user)
  End IF

End Sub

The Else-Statement works absolutly fine for the Infopath 2007 Client

But the TRUE Statement where I try to collect the user_id does only pull the
Server name and not the customer name which actually edits the form.

I have no idea how to solve that issue at the moment.

Please can someone help me ?

Thanks for your time

Regards
Janko
JohannesPrinz@gmail.com - 12 Jun 2007 21:57 GMT
> Hi @ all,
>
[quoted text clipped - 34 lines]
> Regards
> Janko

Thought this might help you out
http://blogs.msdn.com/timpash/archive/2006/08/22/InfoPath-2007-CSharp-Code-For-R
etrieval-of-Username.aspx

Gaurav - 13 Jun 2007 14:14 GMT
Janko,

You can use the xpath function:

xdUser:get-UserName()

Thanks,
Gaurav
 
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.