web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sorting a dropdown lis...
Power Apps
Answered

Sorting a dropdown list in a canvas app

(1) ShareShare
ReportReport
Posted on by 146
Hi All
 
I've been trying to work this out for a couple of hours with no luck.
 
I have a canvas app with a dropdown in it. The drop down gets its items from a dataverse table called 
Paperwork Button Text 1 using a column called Text.
 
In the dropdown Properties pane Items is set to Paperwork Button Text 1S and Value is set to Text.
 
The items in the dropdown list don't seem to be sorted at all and I want a custom sort. I have added a column 
to the dataverse table called Sort Order and have given each entry a number to identify where they should be in the sort order.
 
What I can't do is work out how to tell the canvas app to sort the dropdown list using this column - I've tried using Sort in the Items box
but I can't get the syntax to work despite trying various options found on the web.
 
Can anyone help?
 
Thanks!
 
Simon
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi
     
     
    Let's pretend you have 2 columns
     
    Foo and SortOrder
     
    And they are in Table School
     
    SortByColumns(School, "SortOrder", SortOrder.Ascending)
     
    And done
     
  • Simon Dowse Profile Picture
    146 on at
    Thanks so much @FLMike - it works perfectly.
     
    One thing I had to do which might be useful for anyone else finding this post is that as my table name had spaces in it I had to enclose it in single inverted commas - so using FLMike's example but with a table name of I Hate School, it would be
     
    SortByColumns('I Hate School', "SortOrder", SortOrder.Ascending)
     
    Thanks again.
     
    Simon

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard