People picker data merging in InfoPath 2013
Learn how you can use a formula in InfoPath to merge or concatenate the information from one or more users that have been selected in one or more people pickers in a repeating table and display the information of all of the users in a text box.
You can use the people picker control in InfoPath to select users that are members of a particular SharePoint site or to select groups that exist on a particular SharePoint site.
The people picker control does not contain all of the information you could retrieve about a user. If you require for example to display email addresses or departments of users, you must retrieve this information using the user's profile (through the User Profile Service of SharePoint). For an example of retrieving email addresses of users that have been selected in a people picker control on an InfoPath form, see recipe 67 of InfoPath 2010 Cookbook 2.
The people picker contains a limited amount of information about a user, which includes the display name, the account id or name, and the account type. If you want to concatenate or merge the information from one of these 3 fields for one or more users that have been selected in one or more people picker controls that are located in a repeating table control on an InfoPath form, and display the information as a single line of text, you can use a formula to get the job done in InfoPath. The InfoPath 2013 video below shows you how to do this.
However, if you want to merge one or more users from one or more people picker controls and display all of the users in one people picker control, you will have to write code similar to the code in recipe 71 of InfoPath 2010 Cookbook 3 and InfoPath 2010 Cookbook 4, which adds a row to a repeating table, since the structure of a people picker control is similar to that of a repeating table control in InfoPath.
In this InfoPath 2013 tutorial video, you learned...
- How to set the Default Value of a field.
- How to use the eval() function and the concat() function in a formula to merge or concatenate the display names of persons that have been selected in one or more people pickers that are located in a repeating table on an InfoPath form.
See more InfoPath 2013 tutorial videos »
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.
Related InfoPath Articles:
- Count persons selected in a people picker in a repeating table
- Add people picker to repeating table in InfoPath 2010
- Extract emails from people picker in InfoPath 2010
- SharePoint Designer workflow to lookup manager of manager for InfoPath people picker
- SharePoint Designer workflow loop through people picker