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 / Update Multi Person Fi...
Power Apps
Answered

Update Multi Person Field in a Form | Get E-Mail from Default Selected Persons

(0) ShareShare
ReportReport
Posted on by 39

Hi Community, 

 

I'm stuck on a problem and I'm sure you have an idea.

 

I have a person multiple selection field in SharePoint, which can be stored via the Power Apps form via UserSearchV2. Everything is saved correctly here.

 

However, if you open the app again on the SharePoint element, the default SelectedItems does not contain any e-mail information that I could pass to the update property.

 

{DisplayName:"";Claims:DataCardValue4.Selected.Mail;Department:"";Email:"";JobTitle:"";Picture:""}

 

Do you have a simple idea how I can get the email information?

 

Or do I have to create a collection with ForAll + UserSearch based on the user names?

 

Greetings,

Alex

 

UpdatePersonfield.PNG
UpdatePersonfield3.PNG
UpdatePersonfield2.PNG
Categories:
I have the same question (0)
  • Verified answer
    AldenKnibbs Profile Picture
    107 on at

    One approach to get the email information is indeed to create a collection that includes the necessary user details. Here's a simplified version of how you could achieve this using the ForAll function along with Office365Users.SearchUser() to get the user details:

    1. First, make sure you have added the Office 365 Users connection to your app.
    2. Use the OnVisible property of the screen or the OnStart property of the app to populate a collection with user details. You can use something like this:

    ClearCollect( ColUserDetails, ForAll( YourPersonField.SelectedItems, { DisplayName: DisplayName, Email: Office365Users.UserProfileV2(UserPrincipalName).mail, Department: Department, JobTitle: JobTitle, Picture: Picture } ) )

    Replace YourPersonField with the actual name of your person multiple selection field.

    1. Bind the Items property of the people picker to ColUserDetails to use it as the default selection:

    Items = ColUserDetails

    Please note that this approach may be subject to delegation warnings if you have a large number of items due to the way the ForAll and Office365Users.UserProfileV2() functions work. It's also making a call for each user to the Office 365 Users profile, which could be slow if you have many users.

  • alexaso Profile Picture
    39 on at

    I want still use the people picker in the office search. So my Item-Bind still 

     

    Office365Users.SearchUser({searchTerm:DataCardValue4.SearchText;top:5})

     

    Unfortunately I do not get a UserPricipalName from the default values

     

    ClearCollect( ColUserDetails, ForAll( YourPersonField.SelectedItems, { DisplayName: DisplayName, Email: Office365Users.UserProfileV2(UserPrincipalName).mail, Department: Department, JobTitle: JobTitle, Picture: Picture } ) )

     

    See DatacardValue4.SelectedItems, in the People Picket I choose a random employee and get the information.

     

     alexaso_0-1712243396993.pngalexaso_1-1712243444447.png

  • alexaso Profile Picture
    39 on at

    With following Code on the Save Button it worked: 

     

    ClearCollect(
    ColTeilnehmer;
    ForAll(
    DataCardValue4.SelectedItems;
    {
    DisplayName: DisplayName;
    Claims: First(Office365Users.SearchUser({searchTerm:DisplayName})).Mail;
    Department: "";
    Email: "";
    JobTitle: "";
    Picture: ""
    }
    )
    );;

     

    Its based on DisplayName. So there is a small chance that the wrong user will be drawn for double names.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard