Skip Ribbon Commands
Skip to main content

Ben There, Done That

:

SharePoint Ben > Ben There, Done That > Posts > Getting Usernames in InfoPath
January 25
Getting Usernames in InfoPath

I'm working on an InfoPath form for a client using Foms Services and needed a field in the Form that matched a Person/Group column in a SharePoint list. I first tried using the Username() function in InfoPath, however, this pulls the username in the form of domain\username and the column in SharePoint uses the Friendly name of the User, LastName, FirstName. The next step was to search and see what other people had done. I found one solution that doesn't require any code here. Great, this will be easy. I went to attach to the Web Service, and low and behold, it wasn't there. Then I check the MOSS install I had on my notebook and there it was. My client was running WSS with the Forms Services add on and didn't have it. This was one of those Web Services that was included with MOSS but not with WSS, so it was back to searching. Then I ran across this site. I copied and pasted all the code made the few minor XPath revisions to fit it to my form and it worked beautifully!! It's a great solution and now the client is happy. So, if you're developing in InfoPath Forms Services, here are your two options, one for WSS and one for MOSS. Hope it helps all you fellow InfoPath Devs!

 

 Comments

 
 
 
 
 
 
 
 
 
 
 

Glad you liked it. Would you like to share?

Sharing this page …

Thanks! Close

Add New Comment

 

Showing 0 comments

    Trackback URL
     
    blog comments powered by Disqus
     

     Pre-Disqus Integration Comments

     

    Comments

    There are no comments for this post.