Map InfoPath people Picker to Sharepoint People Picker

Actuallly, we can’t map Infopath people picker field to Sharepoint people picker field directly using InfoPath designer. There is a need to play a little trick here. I created this one stop solution by reffering to different blogs/articles on internet but no article had the complete solution.

Solution will be a combination of InfoPath and Nintex workflow. One can also create workflow using SharePoint designer rather than Nintex.

How to Map InfoPath people picker (Single selection ) to Sharepoint People Picker

Brief Summary –

1) In InfoPath form, Add Infopath people picker field. Create a textbox field and set it’s default value to pick ‘AccountId’ from Infopath people picker field.

2) Create a Sharepoint people picker field in SharePoint list.

3) As SP people picker field internally store ‘AccountId’, copying AccountId from IP’s(InfoPath) textbox to SP people picker will provide ideal input to latter. So, Create a workflow using SP designer/Nintex which will assign InfoPath textbox field value to SP people picker field.

 Implementation

1) Using InfoPath designer, add a people picker and name it  ‘Notify’. Add a textbox and name it ‘NotifyTextVersion’.

Set the default value for ‘NotifyTextVersion’. In it set  ‘AccountId’ of  ‘Notify’ field as shown below.

 

2)  Create a SharePoint list using ‘Form Library’ template and name it ‘Demo’. Create a People Picker field in this list and name it ‘Notification ID’. This is the SP people picker that needs to be mapped to InfoPath’s(IP) people picker.

3) Create a data connection using InfoPath designer (I will skip the steps to create data connection here). Now, publish Infopath form to SharePoint ‘Demo’ list. While publishing, don’t map any of the fields in this form with ‘Notification ID’ field in SP list. But, do make sure that ‘NotifyTextVersion’ form field is added as column in sharepoint list.

4)  Now, Create a Workflow using Nintex (one can also use SP designer). Choose Action/Activity of type ‘Set a Field Value’ and configure it to assign ‘Notification ID’ field a value of ‘Notify Text Version’ field.

Go to workflow settings and set it to run on when ‘Item is added’. Publish it.

5) Add a new item to ‘Demo’ List and click on submit.

6) You will see that added user is copied to sharepoint people picker’s ‘Notification ID’ field.

How to Map InfoPath people picker (with Multiple selection ) to Sharepoint People Picker

Same steps as for people picker with single selection. Just change step 1. Set the default value of  textbox field in Infopath form to

eval(eval(Person, ‘concat(pc:AccountId, “; “)’), “..”). Here, replace ‘Person’ with ‘Notify pc:Person’ as shown below.

Follow rest of the steps as is and it will even work for people picker with multiple selection.

Thats it !!

Comments

  1. DJB says:

    Thank you so much! I’ve tried this before, but I think I didn’t publish the correct field (the AccountID) to assign to SP People picker.

Trackbacks

Leave a Comment

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