Showing results for 
Search instead for 
Did you mean: 
Resolver III
Resolver III

Display plain text email addresses from selections in people picker

My app allows a manager to assign a ticket to multiple staff members using a people picker, however, we want to be able to store the assigned staff member's email addresses in a plain text string in order for it to work well with a couple of flows we run later down the line. 


I had tried to create a collection OnChange and then concat the email columns of the collection but have been having trouble with removing items from the collection if they are removed from the people picker, or if a second staff member is assigned in a different session than the first, then the first appeared to drop off the collection too. 


I also had a problem that I had set a 'DefaultSelectedItems' to the assigned user in certain situations eg. a certain task is selected therefore it is automatically assigned to the expert in that field, but the defaultselecteditems property didn't seem to trigger the OnChange meaning the email address was not added to the collection/string.


Is there any way to collect the email addresses from the people picker both on a manual change and a default selection?


At the moment I have changed the dropdown to a basic combobox where the manager just picks out email addresses from the list, but I find it much more aesthetic and user friendly to choose/display names rather than emails!


Any help is appreciated.



Accepted Solutions
Super User
Super User

Super User
Super User

@misc For the purpose of easily adding and removing from the Collection, it would be better to store the emails as separate records without concatenating them. You can always concatenate them before sending it to a Flow.

OnChange  will get triggered only when a change is manually made (In some strange occasions it does get triggered when the Default value changes but it is not designed to work like that. So, don't rely on that).

To add the email based on some other change you can add it to the collection in the same place where the other change is made.  

Super User
Super User


Resolver III
Resolver III

Thanks for your response. I have gone back and tried to do this today but my collection does not seem to be getting the email address at all now?


Code of taskdpd is:

ClearCollect(Assigned, {Name: DataCardValue10.SelectedItems.DisplayName, EmailAddress: DataCardValue10.SelectedItems.Email})

 DataCardValue10 is the peoplepicker which has the default:



And my collection ends up looking like this:



The DataCard TicketAssignedToName I have tried both:


Concat(Assigned.EmailAddress, "; ")

and as you suggested:

Concat(DataCardValue10.SelectedItems, Email, "; ")

The former ends up just showing the semi-colon and the latter returns empty. It just seems Email isn't collecting at all?


Not sure what I'm doing wrong here! 

Your ClearCollect function assigns

Name: DisplayName
EmailAddress: Email

but the initial list in the taskdpd only has those fields: @Anonymous.type, Claims, DisplayName


Naturally, in the collection you have values for DisplayName, but not the e-mails, since there's no Email field, or?..

I'm not sure actually...though I had it working previously and I was sure I used Email then so I had assumed that wasn't the problem.


I managed to use this code in the plaintext label in the end and it is working fine. I think this is what Zmansuri had meant in the first place but I hadn't understood properly.

Concat(DataCardValue10.SelectedItems, Email, "; ") & Label11.Text


Glad we managed to lead you to the solution together with @zmansuri 🙂

Have a good day

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,169)