View Single Post
Old 10-22-2020, 11:41 AM   #3
chaley
Grand Sorcerer
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: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
Maybe try using an advanced rule with this template

Code:
program:
    fmts = field('formats');
    common = 'epub, pdf, azw3, mobi, cbz, paperbook';
    diff = list_difference(fmts, common, ', ');
    cnt = count(diff, ',');
    test(cmp(cnt,0,'','','gt'),'question-mark.png','')
replace 'question-mark.png' with the name of your icon. Also note that the multiple assignments here make the template slower, but more readable.
FWIW: that last line can now be written
Code:
if cnt ># 0 then 'question-mark.png' fi
chaley is offline   Reply With Quote