Can't Sort List by Number Property

I’ve been trying to sort a list by a number property, but it never seems to work.
The list is also filtered, may that be what’s preventing the sort criteria from working?

The filter normally should not affect sorting of a list.

But there is a common problem with numbers, if you use them for list sorting. For example,

Let’s you have numbers as follows,


In above case, results 1, 10, 11, and 12 will come first, and then 2, 3, 4, 5, 6, 7, 8, and then 9 will come at last.

Because sort with numbers matches the first letter, and it does not care that 10 is bigger than 2, or 3, it just matches the first number which is 1 for 1, 10, and 11.

To fix this issue, there is a suggestion, as follows,

Start your numbering from let’s say 1000 (if your records are in thousands), then next number will be 1001, 1002, 1003, 1004, and so on. In this way your sorting based on number property will alway display correct results.

1 Like

Thanks for the input. I didn’t know that.
Unfortunately, that’s not my case yet. I sorted “number property - high to low”, with some records having a 1 and the others not having anything. Since not having anything is considered zero, I was expecting the ones that have 1 to appear first. That doesn’t happen and the list is sorted by creation date instead.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.