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 / Combo box is not displ...
Power Apps
Answered

Combo box is not displaying selected items from the Datasource

(0) ShareShare
ReportReport
Posted on by 168

Hi,

 

I have combo box where users can search for users within the organisation, and can select multiple users.  This is then stored in a SharePoint list, where the results are stored as text, separated by a semicolon.  However, when i retrieve the record and these values, i don't seem to be able to get the combo box to show the results stored in SharePoint.  This is the formula i was using in the DefaultSelectedItems property:

 

ForAll(
 Split(varCustomerRecord.AccountManagers, ";"), First(Office365Users.SearchUser({searchTerm: Result,top:1})).Mail)

 

 

Any ideas why the relevant records are being selected?

Categories:
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @KennyJ ,

    Two things - the DefaultSelectedItems need to be a Table, reflecting the field displayed, which I suspect is Mail  - you have not posted the Items of the Combo Box, but I assume it is an Office365Users search something like

    Office365Users.SearchUser(
     {
     SearchTerm: Self.SearchText,
     Top: 999
     }
    ).Mail

    The other issue is why are you bothering to search for a value you already have in the string ? I suspect you are simply after

    {
     Mail:
     First(
     Split(
     varCustomerRecord.AccountManagers,
     ";"
     )
     ).Result
    }

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • KennyJ Profile Picture
    168 on at

    Hi,  thanks for coming back to me.

    I updated the DSI to the above, but it only giving the first item, not everyone.

     

    This is what i have in Items

    Office365Users.SearchUser(
     If(
     IsBlank(cboAccountManagers.SearchText),
     {searchTerm: "zzz"},
     {searchTerm: cboAccountManagers.SearchText}
     )
    ).Mail

     

    This is why i was originally trying to create the ForAll as i thought i would need to loop through each of the records where there is more than one user selected.

     

    Thanks

  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @KennyJ ,

    If you want them all, you just need

    RenameColumns(
     Split(
     varCustomerRecord.AccountManagers,
     ";"
     ),
     "Result",
     "Mail"
    )

    which will produce a Table with a Mail field matching your selection structure. You also do not need to test for blank SearchText in your Items - it will display all records until you put something in there.

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • KennyJ Profile Picture
    168 on at

    Thank you, this works.

    Much appriciated.

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard