View Single Post
Old 10-22-2020, 01:53 PM   #4
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by chaley View Post
FWIW: that last line can now be written
Code:
if cnt ># 0 then 'question-mark.png' fi
That does make things look better, I saw you using it but have not checked the docs on it.

Now that I think of it, the count step is redundant, and using chaley's new if statement the template can be further simplified as follows:

Code:
program:
    if list_difference(field('formats'), 'epub, pdf, azw3, mobi, cbz, paperbook', ', ') then 'question-mark.png' fi
This does not use assignments and should have better performance. I wonder whether putting this in a custom column instead might be better performance wise?
capink is offline   Reply With Quote