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 / ComboBox Sort+Filter b...
Power Apps
Unanswered

ComboBox Sort+Filter breaks search function

(0) ShareShare
ReportReport
Posted on by 432

Hello All,

 

I'm running into a tiny issue with a combobox with searchfield.

The combobox is filled as such:

If(!IsBlank(ComboBoxNaam.SearchText);(DataSource)

However my results are not sorted in any particular way and I wish to sort them based on A-Z.

I tried this:

If(!IsBlank(ComboBoxNaam.SearchText);SortByColumns(DataSource;"Naam";Ascending)

 However once I change the code to include the sortbycolumns the [allow search] attribute is automatically turned off. I can switch it back on but the searchfield won't work regardless of the [allow search] attribute's value.

 

Having the same problem in a different ComboBox where the working (non sorted) code looks like this:

If(!IsBlank(ComboBoxOrg.SearchText);Filter(Distinct(DataSource;Titel);Result <> "a"))

 

Perhaps I am doing something wrong with the expressions but perhaps not, im not entirely certain.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @gjeh 

    What is the Items property of the combobox?

  • gjeh Profile Picture
    432 on at

    the datasource is a sharepoint list, the items are list items.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @gjeh 

    Sort the list at the datasource level for the combobox.

    Sort(SPlist,Naam,Ascending)
  • gjeh Profile Picture
    432 on at

    Thanks for your reply.

     

    But if i edit this code:

     

    If(
     !IsBlank(ComboBoxOntvangerINK.SearchText);'Office365-gebruikers'.SearchUser({searchTerm:ComboBoxOntvangerINK.SearchText})
    )

     

    to

     

    If(
     !IsBlank(ComboBoxOntvangerINK.SearchText);Sort('Office365-gebruikers'.SearchUser({searchTerm:ComboBoxOntvangerINK.SearchText});Ascending)
    )

     

    my result is this: (After turning setting 'allow search' back to true because for some reason this keeps turning off everytime i edit the formula)

    sorting.png

    as you can see it is not sorted alphabetically, unless it is sorted on a different column than name.

  • bcampbell13 Profile Picture
    58 on at

    bcampbell13_0-1612292156597.png

     

     

    Look for the setting and turn it off and see if it fixed the problem?  I've found that with that setting off, the it creates a problem with sorting or filtering.  I don't fully know why, it has something to do with how it limited the fields it understands exists (for performance reasons) under the hood.

     

    in my experience, that setting is broken, as much as I'd love to turn it on for performance, I can't.

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard