View Single Post
Old 10-10-2013, 10:05 AM   #11
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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by SnakeCharmer View Post
Is the series column considered multi-value? Since it also has the series number along with the name.
No, the series column is single value. In templates, the index is separate from the series name, i.e., {series} and {series_index}.

To check if series and #secondseries are the same, use something like the following in a column built from other columns
Code:
{series:'strcmp($, field('#secondseries'), '', $, '')'}
This template will output the series name if the two columns contain the same value, otherwise it outputs nothing.

You could do a bit of fuzzier searching by using a "contains" match instead of an exact match. Something like:
Code:
program:
	a = field('series');
	b = field('#secondseries');
	first_non_empty(
		test(b, contains(a, b, b, ''), ''),
		test(a, contains(b, a, a, ''), '')
	)
chaley is offline   Reply With Quote