Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-21-2020, 05:23 PM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,644
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Sorting and undefined values

When sorting a column A-Z, all the books with an undefined value in that column sort to the top. Aside from using columnname:true or using composite columns (still figuring out the template language), are there any workarounds to make them sort to the bottom while preserving the alphabetical order?


Last edited by ownedbycats; 07-21-2020 at 10:07 PM.
ownedbycats is offline   Reply With Quote
Old 07-22-2020, 11:59 AM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,644
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I was able to get the sort the way I wanted by using composite column.

Code:
program: 
	test(field('#columnname'), 'Yes', '')
First I sorted A-Z by the column, then I sorted by the composite column so that all the Yeses were on top. A bit kludgey but it works.
ownedbycats is offline   Reply With Quote
Old 07-22-2020, 01:03 PM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I was able to get the sort the way I wanted by using composite column.

Code:
program: 
	test(field('#columnname'), 'Yes', '')
First I sorted A-Z by the column, then I sorted by the composite column so that all the Yeses were on top. A bit kludgey but it works.
Isn't using a saved search '#columnname:true' then sorting the column easier and more visually pleasing? Or if VLs are tabs, create a VL for '#columnname:true' then sort? Of course these "solutions" assume you don't want to see the non-Yes lines.

If you know a maximum value for a column, perhaps a composite field like this is better (assuming a text column):
Code:
program:
	f = field('#columnname');
	test(f, f, 'zzzzzzzzz')
chaley is offline   Reply With Quote
Old 07-22-2020, 01:32 PM   #4
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,644
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
It was mostly for View Manager sorting purposes. It does have the option to filter to a saved search but I also wanted to see the non-Yes books too. I might try that other column though.
ownedbycats is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removal of undefined classes from text mcdummy Editor 16 07-08-2020 07:45 AM
Issues with decimal numbers sorting + sorting series but showing title first TheRealAce Devices 3 12-23-2019 03:53 PM
Is there way to list undefined classes? phossler Editor 10 07-29-2018 09:33 PM
Sorting tag values in tag browser mcam Library Management 15 08-25-2013 05:50 AM
PRS-600 Sony library - Error undefined omk3 Sony Reader 13 01-22-2010 10:52 AM


All times are GMT -4. The time now is 05:35 AM.


MobileRead.com is a privately owned, operated and funded community.