Hi,
I have a PowerApps form with a people picker that allows multiple selections. Source of the data card is a SharePoint list with People column. Option 'Allow multiple selections' is 'On'. Users can manually search people and add them one-by-one to the data card. See below screenshot:
It works fine for 1 or 2 people to be added manually by typing first letters of a name and selecting them from a drop-down, but in case we need to add multiple names then typing manually is not the best option.
We normally get the list of names from an Outlook e-mail (CC field of an e-mail) and would like to copy-paste that to the people picker. If I copy-paste the CC field from an e-mail to a text file, the string looks like this:
LastName1, FirstName1 (Company - Country1/City1) <firstname1.lastname1@company.com>; LastName2, FirstName2 (Company - Country2/City2) <firstname2.lastname2@company.com>...
What is the best option for the people picker to accept this string from Outlook? I was thinking of pasting this string into a TextInput and then using some formulas to parse it but I am afraid it is not going to be the best option and the delimiters might be different due to different user settings in different countries. Is there a better way to let people picker accept such a string as an input?
Many thanks in advance!
Solved! Go to Solution.
Hi@khromykhm,
Could you please share a bit more about the scenario?
Do you want to copy/paste multiple names from Outlook to the PeoplePicker?
Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side.
If you copy/paste strings inside it, the ComboBox could not recognize the separator, the pasted part could not be updated to Combo Box's SelcetedItems.
As an alternative solution, you can try the following workaround.
》Add the Office365Users connector and connect it to your App.
》Add a TextInput and set the OnChange property as below:
ClearCollect(
Temp,
ForAll(
Split(
TextInput2.Text,
","
).Result,
{
DisplayName: Result,
Claims: "i:0#.f|membership|" & First(Office365Users.SearchUserV2({searchTerm: Result}).value).Mail,
Department: "",
Email: First(Office365Users.SearchUserV2({searchTerm: Result}).value).Mail,
JobTitle: "",
Picture: ""
}
)
)
》 Set the DefaultSelectedItems property of the PeoplePicker as below:
Temp
Best Regards,
Qi
Hi@khromykhm,
Could you please share a bit more about the scenario?
Do you want to copy/paste multiple names from Outlook to the PeoplePicker?
Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side.
If you copy/paste strings inside it, the ComboBox could not recognize the separator, the pasted part could not be updated to Combo Box's SelcetedItems.
As an alternative solution, you can try the following workaround.
》Add the Office365Users connector and connect it to your App.
》Add a TextInput and set the OnChange property as below:
ClearCollect(
Temp,
ForAll(
Split(
TextInput2.Text,
","
).Result,
{
DisplayName: Result,
Claims: "i:0#.f|membership|" & First(Office365Users.SearchUserV2({searchTerm: Result}).value).Mail,
Department: "",
Email: First(Office365Users.SearchUserV2({searchTerm: Result}).value).Mail,
JobTitle: "",
Picture: ""
}
)
)
》 Set the DefaultSelectedItems property of the PeoplePicker as below:
Temp
Best Regards,
Qi
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
187 | |
82 | |
51 | |
37 |
User | Count |
---|---|
288 | |
244 | |
121 | |
76 | |
55 |