Quote:
Originally Posted by Joanna
Is there any way to exclude somegenre from the general rule? Or do I need to create a separate custom column for such genres/groups of books?
|
Code:
{#genre:'list_difference(re($, '\.', ', '), 'somegenre, someothergenre, etc', ',')'}
The
list_difference function removes any item in the second list ('somegenre ...) from the first list (the list returned by the 're' function). Note that somegenre etc will be removed even if it appears as the second or later item (foo.somegenre.bar). If this is unacceptable, then things will get more complicated. Another 're' will be required to remove the undesired prefixes before converting them to a list (what the current 're' does).
Template expressions differ from but are really no more complicated than excel formulae. Unfortunately, excel formulae can easily be incomprehensible.