View Single Post
Old 07-07-2013, 07:09 AM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,143
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by HFC3 View Post
The TEMPLATE instructions show how to use various functions/commands to set values based on 1 condition. For instance; "Display Yes if the book has an EPUB format. Template:{formats:contains(EPUB, Yes,)}"

That works great. But, how do you code this if you want a "YES" where "formats" is one of a number of possible values; "EPUB" as well as "MOBI" and {however many more you wish} types?

Thank you.
By looking for a non empty intersection of your list of desired formats and the actual list of formats..

When I am more awake I will post an example
PeterT is offline   Reply With Quote