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 / How to setup a multi p...
Power Apps
Answered

How to setup a multi people picker field in powerapps with SQL server as the database

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

Wishing everyone a very Happy New year. 

 

I have created a power app with sharepoint as a data base and was able to create a good app with many functionality. Now i am trying to explore how i could connect Power Apps with SQL server and see if i can make my app scalable. Was handpicking some of the challenges i had when creating the app using sharepoint and was trying to implement it in an app linked to SQL Server.

 

First of is the people picker field, I am using Office365Users.SearchUserV2() in a combo box to search for a user using the display name or email and after i select the user and save the form, the users email address gets saved in SQL Server table. When i edit the form i am able to retrieve users DisplayName based on the email saved.  All this works well because its a single user that i am selecting.

 

The problem i am facing is when i have multiple users. On form save multiple users email concatenated with ";" is saved in SQL Server. But when i edit the form combo box is blank. I am not sure how based on the email saved for multiple users i can prepopulate the combo box with the DisplayName .

 

Thanks in advance for you help and taking time to lookin into my issue.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You will need to provide a table of records that match what you have in the Items property of the combobox!

     

    What I would consider is to reduce the schema of the Items record to the bare minimum.  So, since you are interested in the DisplayName and Email address, those would be the ones.

    So the Items property of the Combobox would be:

    ShowColumns(Office365Users.SearchUserV2(Self.SearchText).value, "Mail", "DisplayName") 

    Then, for simplicity, it would be easier to store both columns in your data field.

    So the Update property of the Datacard with this combobox would be:

    Concat(yourCombobox.SelectedItems, Mail & "~" & DisplayName & ";")

    Finally, in the DefaultSelectedItems property of the Combobox, the following formula:

    ForAll(
     Filter(
     Split(Parent.Default, ";"),
     !IsBlank(Result)
     ),
     With({_s:Split(Result, "~")},
     {Mail: First(_s).Result,
     DisplayName: Last(_s).Result
     }
     )
    )

     

    In this case, the DefaultSelectedItems table will have records with Mail and DisplayName...which will match the records of the Items property.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes  Perfect.....Thank you so much.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard