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 / Primary Column Sorting...
Power Apps
Unanswered

Primary Column Sorting (When a Number as Text)

(0) ShareShare
ReportReport
Posted on by 1,265

I have a Primary Column (text) for a vehicle fleet that contains a number.  With record entry, I see...

 

14

2

23

9

 

Is there a way to sort the Primary column by the numeric content?

 

2

9

14

23

I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @RJF61 - You can wrap the Primary Name column with a non-delegable Value function. For example:

     

    Sort(
     'Your Data',
     Value('Primary NameColumn'),
     SortOrder.Ascending
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution

    If you like my response, please give it a Thumbs Up.

  • RJF61 Profile Picture
    1,265 on at

    @Amik Thanks for the response.  I assume this would occur in a Power App and not the Dataverse table?

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @RJF61 ,

     

    Sorting with text fields are incorrect though,

    I suggest you create a new Field that will hold numeric values of the text field.

     

    Then you can sort with respect to that field.

     

    Hope this helps

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Correct. As explained in the other thread, a Primary Name column can either be Text or Auto-Number.

     

    @Ethan_R - this is regarding Dataverse.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution

    If you like my response, please give it a Thumbs Up.

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Yes @Amik ,

     

    That's why the suggestion of having a numeric field makes sense. 

    As per below Image, I had to create a sequence number to show proper sorting, since string sorting doesn't work properly. As string (red) will consider 1 -> 10 -> 2 than the numeric (blue) 1 -> 2 -> 10

     

    Ethan_R_0-1684353751728.png

     

     

    Hope this helps

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Ethan_R - ok I misunderstood you before. Makes sense to me

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard