View Single Post
Old 01-08-2015, 10:45 PM   #1
bmix
Member
bmix began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2014
Location: Budapest/Hungary
Device: Kindle4,reMarkable2,MoonReader Pro
Question How can I boolean OR several tags into one custom column?

Hi,

I tried setting up a Usercolumn (user defined custom tags) because I want to use it to flag the book as part of a Kindle Collection, using the Collections plugin's import/export feature, that reads/fills this custom colum.

The column shall be named "Philosophy & Essays" if any of the tags of the book contain ("Philosophy" OR "Philosophie" OR "Essay" OR "Essays" OR "History" OR "Geschichte"). So, basically, I want to automate the addition of a flag.

The template I used first was:

Code:
{tags:'contains($,"Philosophy","Philosophie & Essays", "")'}
But, obviously, this only checks for a sinlge tag. What I need is a boolean OR. There is the or(value, value, ...) function, but I do not know how to apply it in this context.

Code:
{tags:'contains($,or("Philosophy", "Philosophie"),"Philosophie & Essays", "")'}
does not solve it.

On this: What do you guys use in order to test-evaluate such templates? The search-input in the main interface for the library does not play well with this, since the contains() function has a string output as a result.

EDIT: I found the template test GUI. So the last question is answered.

Thanks, Andreas

Last edited by bmix; 01-08-2015 at 10:54 PM.
bmix is offline   Reply With Quote