![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Undefined sorting in composite columns
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 Last edited by ownedbycats; 01-27-2022 at 03:53 AM. |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
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'. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That will work.
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sorting of composite numerical columns with formatting | ownedbycats | Library Management | 4 | 06-26-2021 03:45 PM |
Custom Columns: Undefined values | ownedbycats | Library Management | 0 | 03-16-2021 09:00 PM |
Should composite columns appear in Grouped Searches? | ownedbycats | Library Management | 3 | 02-13-2021 03:43 PM |
Quickview and composite columns | ownedbycats | Library Management | 2 | 12-25-2020 04:43 PM |
Sorting and undefined values | ownedbycats | Library Management | 3 | 07-22-2020 01:32 PM |