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 / SortbyColumns - Priori...
Power Apps
Unanswered

SortbyColumns - Prioritize Letter then Numbers and allow Empty Selection

(0) ShareShare
ReportReport
Posted on by 166

Hi,

 

I would like to ask if is there a way to use SortByColumns wherein it prioritizes the sorting of letters first then numbers?

 

For example, I have the following column data:

256

123

88

1

102

All

 

Then dropdown in PowerApps should put "All" on top of the list then followed by numbers in Ascending order.

 

Also, is there a way to enable blank selection and it should be on the top of the option?

 

For example, same data above but the dropdown should be showing the following in order: <Blank selection>, "All", then numbers in ascending order.

Categories:
I have the same question (0)
  • QuentinDURIEZ Profile Picture
    577 Moderator on at

    Hi,

    You can achieve this by making a two-step collect like in this example :

     

    ClearCollect(_colDemo ,Blank(), "All") ;
    
    Collect(_colDemo, SortByColumns( ["256", "1" , "88"] , "Value" ))


    First, ClearCollect with the Blank() and "All", then collect sorted other elements 


    Finally, use you collection as your DropDown Items

     

    image.png

     

    Regards,

     


     

  • ComicSansrival Profile Picture
    166 on at

    Hi,

     

    I tried replacing my old formula, but I am having an issue with the outcome.

    Here is the formula:

    SortByColumns(Filter('Log - Lookup DB', Code = DataCardValue33.Selected.Result),"field_2",SortOrder.Ascending)

     

    The above formula worked but the "All" and blank option is at the bottom.

     

    To give you an idea on the above formula, I use filter since there's a wide range of code but when the connected column has a value then the option for the code will shrink and shows only the relevant codes and option to use "All".

     

    Is there a way that you can share here the formula for the above formula?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard