cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Copy-paste from e-mail contacts to people picker

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:

khromykhm_0-1596231479832.png

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!

@Reza 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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

View solution in original post

1 REPLY 1
Community Support
Community Support

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

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (4,264)