View Single Post
Old 11-24-2012, 04:26 AM   #2
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,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The only way to do this is to create a composite custom column (col built from other cols) and populate it with the first item in the series hierarchy. Something like the following template:
Code:
{series:subitems(0,1)||:}{series_index:>06.2f}
The template adds the series number with leading zeros so that it is sorted by series name then series number.

If you have a large library then the following template general program mode template will be faster because calibre will compile it into python
Code:
program: strcat(subitems(field('series'), 0,1), ':', format_number(field('series_index'), '{0:06.2f}'))
chaley is offline   Reply With Quote