View Single Post
Old 02-19-2012, 04:51 AM   #11
chaley
"chaley", not "charley"
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: 5,797
Karma: 1216080
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Joanna View Post
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.
chaley is offline   Reply With Quote