View Single Post
Old 04-26-2013, 05:57 PM   #71
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: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by rifka View Post
You created it. NUMBER is {#releasedate:'days_between($, today())'}. I'll make a note to remind you in a couple of weeks.

Meanwhile can you make this work: {#number_index: ifempty(na),>=1, calendar, star}
So if NUMBER is empty then "NA". if NUMBER is greater than or equal to 1 then "calendar", otherwise "star".

Am I even close?

Tx
you have the right idea but the details are not right.

I am not near a real computer so typing programs isn't straightforward. That said, the template would look something like
Code:
program:
n = field('#number_index');
test(n, cmp(n, 1, 'star', 'calendar', 'calendar'), 'n/a')
chaley is offline   Reply With Quote