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 / Statement is sorting C...
Power Apps
Unanswered

Statement is sorting ComboBox, but Gallery not displaying results.

(0) ShareShare
ReportReport
Posted on by 88

I have a ComboBox looking at a SharePoint list and the ComboBox displays numbers, although they are text values.

 

Currently, the ComboBox "Items" is set to...

 

Distinct('SIB85 - Patch Inventory',SIB85_Floor_Port_No)

 

and this displays un-ordered values in the ComboBox and updates the gallery with the select ComboBox value.  I want the values in the ComboBox to be ordered. I therefore have this code...

 

Sort(Distinct('SIB85 - Patch Inventory', Value(SIB85_Floor_Port_No)),Result,Ascending)

 

and it now displays the ComboBox values in order, but when a ComboBox value is selected, the Gallery doesn't update to display the associated values with the ComboBox.  Why?

 

Thanks in advance,

 

 

Categories:
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    The only difference i am seeing is you have used Value keyword. Which converts text type into number type. So your comparison is not getting done. Try removing value. Or make sure in the gallery you are comparing it with number type

  • DarkStranger Profile Picture
    88 on at

    Bit confused by your statement saying that the only difference you can see is that I have used the "Value" keyword?

    When is have the below to snippets of code...

    Distinct('SIB85 - Patch Inventory',SIB85_Floor_Port_No)

    Sort(Distinct('SIB85 - Patch Inventory', Value(SIB85_Floor_Port_No)),Result,Ascending)

     

    I just want my ComboBox to sort the "Numerical" text values and update the gallery with the selected ComboBox value.  If there is a different way, please share.

     

  • DarkStranger Profile Picture
    88 on at

    Anyone?

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Try this:

    SortByColumn(Distinct('SIB85 - Patch Inventory', Value(SIB85_Floor_Port_No)),Result,Ascending)

    And Also This:

    SortByColumn(Distinct('SIB85 - Patch Inventory', SIB85_Floor_Port_No),Result,Ascending)

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    @DarkStranger ,

    Try this

    Sort(
     AddColumns(
     Distinct(
     'SIB85 - Patch Inventory', 
     SIB85_Floor_Port_No
     ),
     "SortNo",
     Value(Result)
     ),
     SortNo
    )

     

    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.

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @DarkStranger ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard