View Single Post
Old 03-08-2015, 03:43 PM   #23
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)
Whoopsies, I got confused between the different template modes -- function mode doesn't require quote, template program mode (TPM) and general program mode (GPM) do.

That should've been:
Code:
{series:'test($, strcat("_", field('series'), " - ",sublist(field('authors'),'0','1','&')), sublist(field('authors'),'0','1','&'))'}/{series_index:0>4s| | - }{title} - {authors:sublist(0,1,&)}
And in GPM:
Code:
program:

short_authors = sublist(field('authors'), '0', '1', '&');
sindex = finish_formatting(field('series'), '0>4s', '', ' - ');

strcat(
	test(
		field('series'),
		strcat("_", field('series'), " - ", short_authors),
		short_authors
	),
	'/', sindex, field('title'), ' - ', short_authors)
eschwartz is offline   Reply With Quote