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 / Sort by columns in a d...
Power Apps
Unanswered

Sort by columns in a drop down using columns syntax

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone.  I asked this question last week, rather poorly, so I am giving it another shot!

 

I am trying to sort by columns a drop down using the code below:  

 

SortByColumns(Filter(Game_view_powerappss,StoreID= Value(varUser.Department)),If(Toggle4_1.Value,"cr3db_seqorder","cr3db_gamenameandmodifier"),Ascending))

 

This code is working perfectly on a gallery, but only partially on a drop down.  The 2 dataverse columns are seqorder (a decimal column) and gamenameandmodifier (a text column).  The gamenameandmodifier column, when sorted, results in an alphabetical layout, which is exactly what I need.  When I click the toggle in the other direction, the data is sorted by seqorder, which goes from 1-200 correctly.  These both work in the gallery, but not in the dropdown.  Only the alphabetical works in the dropdown.  I am trying to show the data from the gamenameandmodifier in the dropdown.  I have very similar code that works in a sharepoint list for the dropdown, but not in the dataverse.  Not sure if thats my issue or I am missing something in my syntax.

 

Any help would be great, thank you!

Chris

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

    @Anonymous 

    Please try 

    With(
     {gameview: Filter(
     Game_view_powerappss,StoreID= Value(varUser.Department)
     )
     }, If(
     Toggle4_1.Value, Sort(
     gameview,cr3db_seqorder
     ), 
     Sort(
     gameview,cr3db_gamenameandmodifier
     )
     )
    )

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard