1

Is it possible to populate infopath fields with data from the user profile or mysites data?

I found some articles about it in Google, but it doesn't quite work when I follow their instructions. Those are probably for an earlier version of infopath.

I'm trying to populate fields such as name, email, phone, and user ID.

1 Answer 1

0

Yes you can populate the user fields in InfoPath form via userprofileservice data connection. Steps:

  1. Create a Data connection to userprofileservice and save it on a SharePoint Data Connection Library.
  2. Run this data connection when form load and based on your situation you set the query to get the details of a logged in user

  3. set your fields to display user properties from your data connection.

Read the following link to understand how to set a data connection to userprofile service.

Create InfoPath Data Connection to UserProfileService

3
  • Followed the instructions from the link, but didn't work. The field doesn't populate with anything when I click on the form in the browser.
    – Adil Ahmad
    Aug 10, 2017 at 20:26
  • In SP 2013 on-prem (particularly with claims) this can be challenging. You have to ensure that the account that is calling the service has access to the User Profile Service. This usually fails in Office 365 as well due to permissions. The next issue you will face is, in the browser, your auth changes again (as opposed to in the IP client), so you may be running into cross domain issues. The real trick is figuring out which error you are troubleshooting. Aug 10, 2017 at 20:34
  • Edit your data connection file in notepad and add a service account which can access userprofileservice. See Example: infopathdev.com/forums/t/26326.aspx Aug 11, 2017 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.