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 / 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,963 Moderator 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

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 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard