Quote:
Originally Posted by ownedbycats
I wanted to fix some stubborn multi-column sorting (e.g. currently-reading books getting separated depending on whether or not they were on the TBR list) and the best way I figured to do it was to combine #currentlyreading and #onreadinglist:
Code:
program:
if $$#percentread >=# 1 && $$#percentread <=# 99
then 'Currently Reading'
elif $#readinglist == 'To Be Read' && $$#percentread ==# 0
then 'To Be Read'
else 'zzz'
fi
But is there a more elegant way to make undefined values sort to the bottom when using A-Z sort?
|
Composite columns cannot be undefined. They always contain at least the empty string.
In your case I would choose different strings for 'Currently Reading' and 'To Be Read' that sort 'correctly' in a descending sort. For example, 'Currently Reading' ==> 'Now Reading' and 'To Be Read' ==> 'Future'.