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 »

 
 Subscribe for updates via RSS or Email

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.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners
InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013
InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners
InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010
InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers
InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services


Related InfoPath Articles:

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services