web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / URGENT HELP NEEDED: Pe...
Power Apps
Answered

URGENT HELP NEEDED: People Picker Field: How to pull emails for each person selected in 1 field

(0) ShareShare
ReportReport
Posted on by

Hi All,

I currently have an app where I have a people picker field that may have more than 1 person selected, in fact it could be numerous. I need to pull the email address for everyone who is selected. Im currently using the formula Office365Users.UserProfile(E1.Selected.Email).Mail but its only showing 1 of the 2 selected people. How can I make it so it shows all? 

 

This is a time sensitive request and any help you can provide would be really appreciated. Thank you!

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    A little confused that you want to use the Email of the multiple-people picker selections to send to the UserProfile action (expensive performance) to return the Email address again.

     

    You can get the full list of emails from the column with :

       Concat(E1.SelectedItems, Email & "; ")

    Which would return a semicolon separated string.

     

    If you *really* want to send this to UserProfile to get the Email, then:

    Concat(ForAll(E1.SelectedItems, Office365Users.UserProfile(Email).Mail), Value & ";")

    This would produce the same thing, but much longer to do.

     

    I hope this is helpful for you.

  • apirez Profile Picture
    on at

    Hi @RandyHayes ,

    Its all I knew in a previous app. This is fantastic! Thanks so much it worked. If I wanted to pull a different attribute, like employee id, would that be possible with your solution? Thanks again

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    Yes, it depends on what you want.  A lot of information about a user is already associated with the user record coming from the SharePoint column.

    If you need to get other details that are not, then the UserProfile is the way to go. 

    For example, if you wanted the given name for the people in the column, then you would change the formula to this (also note, I'm using the UserProfileV2 in this formula as the other one you have is deprecated)

    Concat(ForAll(E1.SelectedItems, Office365Users.UserProfile(Email).givenName), Value & ";")

     

    If you need something more elaborate, like a GivenName and OfficeLocation, then this would provide that:

    Concat(ForAll(E1.SelectedItems, Office365Users.UserProfile(Email)), givenName & " - " & officeLocation & ";")
  • apirez Profile Picture
    on at

    @RandyHayes 

    Thanks so much for this. Last question I promise. For the people picker field, its not currently showing the names of each person selected, rather a count. Any ideas on how to change this to show the selected people? Thanks!2021-11-03_14-31-56.png

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    Once the selected Items goes beyond what can be displayed in that space, it reverts to x Items.

    If you have only one selected, you will most likely see that displayed.  If your combobox was larger, it would again display up to the amount where it cannot fit them all there.

  • apirez Profile Picture
    on at

    @RandyHayes Is there a way around this by using a label etc? Thanks!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    No way around the combobox itself, but you can certainly augment with another label.

    In that Text property - Concat(yourCombobox.SelectedItems, FullName & ", ")

    Replace FullName to whatever you want to actually display.

    Don't like the trailing comma?...then change to:

       With({_s:Concat(yourCombobox.SelectedItems, FullName & ", ")}, Left(_s, Len(_s)-2))

     

     

  • apirez Profile Picture
    on at

    Thank you! I am learning and really appreciate it!

  • apirez Profile Picture
    on at

    @RandyHayes our organization has added pronouns to our display names in outlook (Pirez, Ashley (She/Hers)). This is making the formula you provided Concat(E1.SelectedItems, DisplayName & "; ") show way too long. Is there anyway to remove the text found within the two ()? Thanks! 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @apirez 

    A little more complicated but not too much.

    With({_s:Concat(yourCombobox.SelectedItems, 
     Trim(First(Split(DisplayName, "(")).Result) & ", ")
     }, Left(_s, Len(_s)-2)
    )

    Here we're just splitting the Display name by the opening paren and then taking the first record of that split (and trimming it in case there are extra spaces).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard