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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to create a multi ...
Power Apps
Unanswered

How to create a multi user combobox which can store and retrieve data from SharePoint person field?

(0) ShareShare
ReportReport
Posted on by 124
How to create a multi user combo box which can store and retrieve data from SharePoint person field? It is working when i allow single person selection but not sure how to implement it for multi user selection.
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    152,855 Most Valuable Professional on at
    What is the Items and DefaultSelectedItems of the Combo Box and the Update of the Data Card. Also the name of the SharePoint Person field and confirm that it is multi-value.
  • uiit3155 Profile Picture
    124 on at
     
    DefaultSelectedItems property has below code which is showing objects in combobox right now instead of user names:
    ForAll(First(colItem).EndorsementRequestCCTo As _item,(Office365Users.SearchUser({searchTerm: _item.Email,top:10})))
    
     
     
    Items properties of code has below code:
     
    Office365Users.SearchUser({searchTerm: EndorsementRequestCCTo.SearchText,top:25})
     
  • WarrenBelz Profile Picture
    152,855 Most Valuable Professional on at
    Two out of four items I need supplied, however one raises another question - what exactly are you trying to do here ?
    ForAll(
       First(colItem).EndorsementRequestCCTo As _item,
       (Office365Users.SearchUser({searchTerm: _item.Email,top:10}))
    )
    If you are wanting the EndorsementRequestCCTo field contents (which I assume is a multi-value Person field), from the first record in colItem then in the â€‹â€‹â€‹â€‹â€‹â€‹â€‹DefaultSelectedItems
    ForAll(
       First(colItem).EndorsementRequestCCTo As _item,
       {
          Claims: "i:0#.f|membership|" & Lower(_item.Mail),
          Department: "",
          DisplayName: _item.DisplayName,
          Email: _item.Mail,
          JobTitle: "",
          Picture: ""
       }
    )
    You can also in the Items
    Office365Users.SearchUserV2({searchTerm: Self.SearchText,top:25}).value
    but all of this will affect writing back the value, so how and where to are you doing that ?
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • uiit3155 Profile Picture
    124 on at
     
    I am trying to use combo box(EndorsementRequestCCTo) for saving new records as well as for loading existing records. I am using colItem collection to fetch the saved record from SharePoint using its ID.
     
    I change DefaultSelectedItems and Items properties of combo box. But now saving of it is not working as no properties(screenshot below) are available except DisplayName. Below is the code i am using inside Patch function for submitting data to SharePoint.
     
    EndorsementRequestCCTo:ForAll(EndorsementRequestCCTo.SelectedItems As _item,{
    Claims: Concatenate(
    "i:0#.f|membership|",
    _item.Mail
    ),
    Department: "",
    DisplayName: _item.DisplayName,
    Email: _item.Mail, // Person email
    JobTitle: "",
    Picture: ""
    })
     
     

     
     
     

     
     
     
  • Verified answer
    WarrenBelz Profile Picture
    152,855 Most Valuable Professional on at
    Your image is too small the read (please post all code in Text), however based on what you have posted, the Patch code should be
    YourPersonFieldName:
    ForAll(
       EndorsementRequestCCTo.SelectedItems As _item,
       {
          Claims: "i:0#.f|membership|" & Lower(_item.Mail),
          Department: "",
          DisplayName: _item.DisplayName,
          Email: _item.Mail,
          JobTitle: "",
          Picture: ""
       }
    )
    and the DefaultSelectedItems just needs two elements
    ForAll(
       YourPersonFieldName As _item,
       {
          DisplayName: _item.DisplayName,
          Mail: _item.Email
       }
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • uiit3155 Profile Picture
    124 on at
     
    Thank you for your valuable help. The issue seems to have fixed now. I was not using Lower() in my patch function which was causing the issue it seems. Thank you so much again for all your assistance :) 
     
    Claims: "i:0#.f|membership|" & Lower(_item.Mail),

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard