View Single Post
Old 08-10-2014, 11:54 PM   #1
kaufman
Calibre Companion Fanatic
kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.
 
kaufman's Avatar
 
Posts: 873
Karma: 1088610
Join Date: Nov 2006
Device: Galaxy Note 4, Kindle Voyage
New Custom Column definition for new sort

This might belong in the Calibre section, but I created it for CC based on ideas that others here gave me, and I am posting it here in case anyone else wants it for the same reason.

This started because people were talking about sorting by Author and then Series and then Title, but this was giving me sorts where the books without series were coming first and then all of the series. What I actually wanted was to have the titles and series mixed together alphabetically. So I created a column called Authors Works that gave the title of the book if the book wasn't part of a series and a series (index) if it was part of a series.

The template is:

program:
first_non_empty(
test(field('series'),
strcat(field('series'), " (", field('series_index'), ")"),
""),
field('title')
)


I then added a custom grouping and now Author autosorts the way I want it to.
kaufman is offline   Reply With Quote