I will select a user in a people picker or contact selector control (Requestor field) on an InfoPath form and I need the user’s Work Phone number (Work Phone) to populate in another field.
1) Create a receive data connection to pull the user profile details using UserProfile.asmx web service provided by SharePoint (GetUserProfleByName method needs to be selected)
2) Create a rule for the “Requestor” field with these Actions:
- Action 1: Set AccountName query field of UserProfile data connection to use the value of the user selected
- Action 2: Query UserProfile data connection
- Action 3: Set WorkPhone returned by the web service to the Work Phone field of the InfoPath form
This should do the trick. You can refer the below article for step by step procedure:
Please leave a comment in case you liked the post or you need my assistance in the course.