Sort order for categories in Attribute Browser

(Mark Ware) #1

UPDATE: I’ve just realised that they are sorted by the values in the summary, i.e. the count of items in each category. I was being very slow!

What determines the sort order of the categories in Attribute Browser?

I’ve got a list of books read, grouped in AB view by PublicationYear (a string). But the sequence of the PublicationYear categories is bafflingly random (not not exactly random, but still baffling – e.g. in the screenshot you can see it goes 2002, 2005, 2004, 2017 and then continues 2003, 2006, 2009, … Call me boring, but I’d just like them in the normal order

Perhaps TBX is just creating some kind of fiendish brain-teaser here to see if I can figure out the sequence, but I’m stuck!

Any ideas?

Starter/Learner Tinderbox document: suggestions?
(eastgate) #2

I believe that, since the categories represent a string attribute, they ought to be sorted in lexicographic order. That would normally be alphabetical order (Able, Baker, Charlie, Dog) and ought to give us 2000,2001,2002 here.

But you’ve asked for a summary of the count of notes in each category. So, Tinderbox is showing you all the years with seven references, then all the years with eight references. I believe the secondary sort is still lexicographic, so in years with eight references we see that 2004 precedes 2017.

(Mark Ware) #3

Mark, many thanks. As so often, I realised what was going on a few moments after posting the query. Once I de-select the summary counting, it all sorts perfectly in lexical order as you describe.