Quote:
Originally Posted by kaufman
I'm trying to create a custom column that shows the series name if it exists, one of two tags if they exist, or "other". I have created this:
program:
first_non_empty(
field(‘series’),
str_in_list( field('tags'),",", "_Next","Next", ""),
str_in_list( field('tags'),",", "_Soon","Soon", ""),
str_in_list( field('tags'),",", "_Favorites","Favorites",""),
"Other"
)
If I take out the series line and the other line it works. If I include those lines I get a template error.
Any help would be appreciated. Thanks.
|
The "series" line is using forward and backward apostrophes. They should both be straight.
The template will run faster if you fetch the tags once, as in
Code:
program:
t = field('tags');
first_non_empty(
field('series'),
str_in_list(t, ",", "_Next","Next", ""),
str_in_list(t, ",", "_Soon","Soon", ""),
str_in_list(t, ",", "_Favorites","Favorites",""),
"Other"
)