Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / sorting a text field c...
Sales forum
Answered

sorting a text field containing text and numbers ???

Posted on by 119

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 119 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

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans