Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Sorting Text Field in a view

Posted on by Microsoft Employee

Hi Guys,

We recently imported a auto number generator solution in our environment to generate Autonumber in a Text field. Records created after implementing auto nmber solution (numbers from 30000) are not sorting properly in OOTB crm View. Please find the below screenshot. Records in 5000 series are numbered manually. Any faced this issue before? 

Thanks in advance !!

5342.view.PNG

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sorting Text Field in a view

    Adding 0's in front of the 5000 series, fixed the issue. Thanks for the information

  • Verified answer
    anonsgate Profile Picture
    anonsgate 420 on at
    RE: Sorting Text Field in a view

    Does it work if you add 0s in front of the manually entered numbers? like 03442? You could write a little script that updates those with length<5

  • Verified answer
    Ivan Ficko Profile Picture
    Ivan Ficko 1,380 on at
    RE: Sorting Text Field in a view

    String length is the key here. You can check a bit more and you will see that numbers that are same length are those subgroups.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sorting Text Field in a view

    Yeah, that is one solution, but we are using that fields in so many places and creating a new field will take time. It was sorting fine before we implemeted the Autonumber generation solution. Now it is sorting fine in the sub groups(numbers manually entered, numbers generated through Auto number genration). I dont know why that difference is. Any idea?

  • Suggested answer
    Ivan Ficko Profile Picture
    Ivan Ficko 1,380 on at
    RE: Sorting Text Field in a view

    That is happening because you are using text field as the record number. You need to use whole number field if you want to sort records like that (numbers from 0 to 9999) or you can use fixed length string as number (numbers as strings from 0000 to 9999)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sorting Text Field in a view

    Sorry for the wrong screenshot, check the below one, I sorted as Ascending, It is applying the sort wierdly.views1.PNG

  • Ivan Ficko Profile Picture
    Ivan Ficko 1,380 on at
    RE: Sorting Text Field in a view

    I can see that "Bid Number" column is sorted in descending order and I don't see any wrong sorting order here. Can you explain what is not ok on this screenshot?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans