Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

sorting a text field containing text and numbers ???

(0) ShareShare
ReportReport
Posted on by 144

Hello!  appreciate that this is a rather strange request as the A-Z sort by Quote Name is working as it should however we have a specific request to have the sorting on the number suffix (!)   So in the example below we would have the 10 then 20 then 30 etc...then eventually 100 and so on. Is this anyway possible wiithout any progrgamming maybe using some naming conventions?

pastedimage1642504386542v1.png

Quote Name

 Test Quote No. 10
 Test Quote No. 100
 Test Quote No. 110
 Test Quote No. 120
 Test Quote No. 130
 Test Quote No. 140
 Test Quote No. 150
 Test Quote No. 160
 Test Quote No. 170
 Test Quote No. 180
 Test Quote No. 190
 Test Quote No. 20
 Test Quote No. 200
 Test Quote No. 210
 Test Quote No. 220
 Test Quote No. 230
 Test Quote No. 240
 Test Quote No. 250
 Test Quote No. 260
 Test Quote No. 270
 Test Quote No. 280
 Test Quote No. 290
 Test Quote No. 30
 Test Quote No. 300
 Test Quote No. 310
 Test Quote No. 320
 Test Quote No. 330
 Test Quote No. 340
  • jaybeegee Profile Picture
    jaybeegee 144 on at
    RE: sorting a text field containing text and numbers ???

    omg that is incredibly smart!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: sorting a text field containing text and numbers ???

    Hi jay ? bee ? gee ?,

    There is no way to directly achieve this by sorting name because it's type is string which is sort by each char in ASCII.

    As a workaround, you could create a Calculated field which get the number in your name:

    pastedimage1642562108807v1.png      pastedimage1642562136519v3.png

    Then convert this field from Text to Whole Number by Attribute Manager in the XRM ToolBox:

    pastedimage1642562250243v4.png

    After this succeed, add the field to your view and sort by it.

    pastedimage1642562364819v5.png

    Result:

    pastedimage1642562398545v6.png

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,904 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans