Thanks! I thought it must have had something to do with the comma! Glad it works now.
One more question: I realized that for a couple of books (audiobooks, in fact) I don't have the number of pages entered. How to get 'blank' results for those books? I.e. how to have something similar to your
Code:
test(progress, pagesread, '');
but checking the content of two columns: #progress and #pages (and if either of them - or both - is empty, render a blank composite column)?
I'm pretty sure the sorting doesn't work, though. Are you absolutely sure it works for you? Based on the screenshot, it looks like it certainly does but theoretically, you could have sorted on myint first, by coincidence, and then the order would not have had to change.
No idea what's wrong with my sorting. When I switch the sorting method to Text or Date, sorting works (obviously, producing bizarre results). When I switch to Numbers, nothing happens whatsoever.
// EDIT I've checked it with another library and another Calibre installation - same results

.