Sort By Set Number - Incorrect Ordering

Recommended Posts

I have searched to see if this was an open bug since it seems so glaring but I can't find one so I'm opening a new topic. If this exists already, admins - feel free to merge.

Using the Set Lists function, if I select Sort By: Set Num, my expectation would be a sorting based on the numerical value of the set's (with any oddball sets that aren't numeric listed alphabetically following the last numbered one). However, that isn't happening. Instead the sort appears to be treating each character of the set number individually so that sets with 4-digit numbers are intermingled with sets with 5-digit, 6-digit, and 8-digit numbers. I tend to sort my spare sets numerically in my storage so I can easily find the one I'm looking for so the database doing something else is undesireable.  The attached image should highlight the problem - Set 2174 should not follow Set 21316 in a numerical listing. 



Share this post

Link to post
Share on other sites

It is a known problem.  I thought the reason it happens is because the 0 place holders that should be in front of the set numbers end up at the end. However, looking at this example from my own sets, if the zeros were added to the end of 119-1 it would be 1190000... -1(whatever the largest amount of zeros needed) and it would be listed before 11908-1.

I'm going to refer this to @Nathan for the reason. 


Share this post

Link to post
Share on other sites

I appreciate this getting referred. Your image is ideal for showcasing this problem. I don't think it's a zero padding issue but rather that the search is being conducted as an alphabetical rather than numeric sort. With it being alphabetical, the sorting is processed character by character so 10830-1 precedes 1139-1 since 0 precedes 1 in the second position. Similarly, 11908-1 precedes 124-1 since 1 precedes 2. In the case of 11908-1and 119-1, we get to the fourth character to sort them and 0 precedes a "-". 

The technical fix will depends on how the data fields are typed in the database and the sort algorithms being used. 

Ideally, I would like to see the set's in your example sorted as:

119-1, 124-1, 125-1, 1076-1, 1139-1, 1144-1, 10727-1, 10738-1, 10762-1, 10827-1, 10830-1, 11908-1

Odd sets named with letters would go at the end in standard alphabetic order so TRUCAPAM-1 would follow all the examples above but precede WishingWell-1. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now