Infopath: Get User Profile Data into your form

I needed to populate a drop down list with all the departments in my university (this is a field that is part of the user profile data.) Through my searching I stumbled through the UserProfileService.asmx and could not easily figure it out. I finally stumbled on a post from the famous Laura Rogers that explained a super easy way to access the information I wanted by pulling in the User Information List. I will put the pertinent parts below and will give a link to her blog post that covers it more in depth.

I am going to assume that you know how to create data connection.
In this case you will create a data connection to a SharePoint library or list then click next.

You will put in the url to your site collection (https://www.yoursite.edu/siteCollectionName/.) Then click next

You will then see list of all the lists or libraries you can choose from. Scroll all the way to the bottom and you should see User Information List. Choose that and click next.

You can then choose the field you would like to bring in. I just needed the Department field and checked that checkbox.
There ya have it.

There is on caveat that is worth noting: “If they are a new user, they will not show in this list until they’ve actually visited a site in that site collection.” I believe that by giving permissions to All Authenticated Users covered this for me as every department was present and I know for a fact that someone from every department has not visited the site collection, though that may not be true as I have no way of testing that theory.

Here is the link to Laura’s post about this:
 User Information within InfoPath Forms

This entry was posted in InfoPath, SharePoint and tagged , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *