Quote:
Originally Posted by eschwartz
http://manual.calibre-ebook.com/temp...-not-found-val
using str_in_list(val, separator, string, found_val, not_found_val)
use "," as separator, val will be field('tags') and you want to search for string "First", then return found_val "First". not_found_val should return empty "" which first_non_empty should skip over, I think.
Personally, I think you should use general program mode for this:
Code:
program:
first_non_empty(
str_in_list(
field('tags'),
",",
"First",
"First",
""
),
field('series'),
"Uncategorized"
)
|
Thanks, this look very helpful. How do I go about using a program mode?