View Single Post
Old 09-05-2014, 03:16 PM   #548
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Okay, so assuming you want "Series Name [03] Book Title" as per post #533.

series_index should be prepended with underscores, to bump it up to 4 digits.

If the custom column "#complex_series" is set to true -- I'll just test if it has any value -- it will add two decimal places. Mark each awkward series with this.
(This would be easier if I could figure out how to test within a template for a numer with decimals.)

Template should be:
Code:
program:

ser_num = test(
	field('#complex_series'),
	finish_formatting(
		field('series_index'),
		'_>7.2f',
		' [',
		'] '
	),
	finish_formatting(
		field('series_index'),
		'_>4d',
		' [',
		'] '
	),
);

strcat(
	field('series'),
	ser_num,
	field('title')
)
(You can delete whitespace if you want, but I left it in to clarify what I am doing.)

Last edited by eschwartz; 09-05-2014 at 03:18 PM.
eschwartz is offline   Reply With Quote