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 / Searching on Filtered ...
Power Apps
Unanswered

Searching on Filtered Choices() in Combobox items

(1) ShareShare
ReportReport
Posted on by 29

I have a Sharepoint column, type "Person or Group" (let's call it AllUsers), which allows me to select multiple users. In my Power App I have a Combobox which successfully uses Choices(SharePointSite.AllUsers) in the Items property to create a searchable list of users. By default it seems to only show the first 16 persons, however if I search for someone outside of those 16 it finds them correctly.


The problem I have is that I would like to filter that list, (e.g. to exclude users showing in a separate list), but I don't seem to be able to do so, either directly or via a collection, without losing the ability to search beyond the first 16 users displayed.

 

For example:

MyCombobox.Items = Choices(SharePointSite.AllUsers)  <= works fine!

Filter(Choices(SharePointSite.AllUsers), !(Email="Joe.Bloggs@mycompany.com"))  <= this correctly excludes Joe Bloggs from the visible list (assuming he is one of the 16 shown by default) but it won't let me search for "William" who isn't one of the 16.

 

Similarly, if I want to use a collection to populate the choice of items in the combobox I also lose full search capability:

CollectClear(MyCol, Choices(SharePointSite.AllUsers))

MyCombobox.Items = MyCol

(The actual collection I am creating is obviously a lot more complicated and appears to works fine from looking at the values appearing in the drop-down box, until I actually search for anyone!!)

 

Is this problem based on a wrong understanding of how combo-boxes work? Is it possible to use a filtered collection in this way??

 

Any help or advice would be greatly appreciated.

 

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @mdgething ,

     

    "Choices()" can only return a limited list of items, you should try with something else.

     

    You can either use "Distinct()" to retrieve unique values from your SharePoint list, or use the "Office 365 Users" connector with "SearchUserV2()".

  • mdgething Profile Picture
    29 on at

    Thanks @WiZey, I'll look into the SearchUserV2() option.

    I'd hoped to be able to use Choices() just because it gives a much more relevant list of personnel. Odd that it functions so differently under a filter....

  • WiZey Profile Picture
    3,023 Moderator on at

    You're welcome.

     

    If your issue is resolved, don't forget to mark as solution so others with similar problem can find this topic.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard