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 a dropdown list w...
Power Apps
Answered

Sort a dropdown list with items [2021, 2022, 2023]

(0) ShareShare
ReportReport
Posted on by 247

Hi, Does anyone know how to sort a dropdown box with static items like [2021, 2022, 2023] ? I was thinking about SortByColumn, yet there is not a column name, or can I add one? In this case, I want to sort descending. 

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @NewBee117 ,

     

    If you don't have a key name, you can just refer to Value:

     

    Sort([2021, 2022, 2023], Value, Descending)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @NewBee117 

    It seems a little odd to sort that particular list as, if it is static and just 3 values, why not just do it there in the list!?

     

    But, @BCBuizer is correct in the formula provided.

     

    Just to expand on that so you understand - In PowerApps everything revolves around a Value column - it is used quite a bit.  Also used everywhere are tables.  General practice is that you want to create tables to use that have Value columns.

    Because of this, a shortcut was put in place from the very beginning.  That was...

    It is a bit much extra typing to put in this formula:

    Table({Value:2021}, {Value:2022}, {Value:2023})

    This formula creates a table with a single column called Value that contains 3 records with the values 2021, 2022, & 2023.

     

    SO...the shorthand methods was created that, if you use [2021,2022,2023] then PowerApps will automatically interpret it as the lengthier formula shown above.  It will produce the exact same table as above.

     

    There is no such thing as a table record with no columns (unless it is truly empty)...so as @BCBuizer mentioned...you have always the Value column to sort on.

     

    I hope this is helpful for you.

  • NewBee117 Profile Picture
    247 on at

    @RandyHayes Very helpful info. thanks.   🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard