View Single Post
Old 06-01-2013, 03:42 PM   #192
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by AJvK View Post
I was afraid of that... Well, thanks anyway. Maybe I'll adapt the method for adding books to one shelf or the other for my purpose - i.e. if added to a series-shelf, then it's not to be added to the author-shelf.
You could probably handle this with a custom column which you would use as the source for the shelf column. Something like

Code:
{:'first_non_empty(field('Series'), field('author_sort'))'}
This would return the Series name if set, else, the author_sort field.

In case a book has no author (not sure if this IS possible) you could also use
Code:
{:'first_non_empty(field('Series'), field('author_sort'),'Uncategorized')'}
to ensure that books ended up on an Uncategorized shelf.

This would all be defined as a custom column in calibre preferences of type Column built from other columns, and then the lookup name would be used in the driver's shelf definition field (prepeneded by a # mark of course).
PeterT is offline   Reply With Quote