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 SharePoint text f...
Power Apps
Unanswered

Sort SharePoint text field containing numbers in PowerApps

(0) ShareShare
ReportReport
Posted on by 124

I have one SharePoint calculated column which is concatenating column A and Column B while retaining preceding zeros.

 

E.g., Consider below SharePoint list Columns:

Column A(Text) Column B(Text) Column C(Calculated) 
001002001002
010020010020
020030020030

 

I want to sort Column A and Column B so that i can generate them with a new highest number for new records, but when i am sorting, these are not sorting properly as Column type is Text and not number. If i change column type to number, then concatenated column dont retain zeros.

 

How can i sort Column A and Column B so that Power App will sort them based on number values and not based on text values.

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @uiit3155 ,

     

    Can you show an example where this is not sorting well? I can't replicate the issue.

     

    Perhaps consider adding a Value function to the column that is to be sorted:

    Sort(
     DataSource,
     Value(
     SortColumn
     )
    )
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Use number fields! Convert A and B to number fields, then you can sort them easily, then change your concat formula to add in the preceding zero's when the number is single or double digits.

     

    Your Concat formula can be handled in Power Apps rather than in SharePoint, using something like this:

    Concat(SharePointListName, 
     If(Len(ColumnA)=1, "00", 
     Len(ColumnA)=2, "0") & ColumnA 
     & If(Len(ColumnB)=1, "00", 
     Len(ColumnB)=2, "0") & ColumnB
    )

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard