View Single Post
Old 04-30-2023, 03:31 PM   #949
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,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Amon_Re View Post
Hmm, this only works if #kobo_percent_read is 1. If the value is between 2 and 100 the result is "finished".
It works for me using an integer column. What exactly is the type of the kobo_percent_read column? Is it float, int, or (shudder) text? And what exactly are the values in the column?

You might be able to make it work using this template that instructs calibre to treat the values as numbers even if they are declared as text.
Code:
{#kobo_percent_read:'switch_if($ >=# 100, 'finished', $ <=# 0, 'unread', 'reading')'}
chaley is offline   Reply With Quote