Thread: Custom Coloring
View Single Post
Old 05-31-2011, 04:53 PM   #35
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,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by mezme View Post
How can I add code that would test the format field?

What I want it to do is:
If format is false then be red else test rating.
Code:
program:
first_non_empty(
    test(field('formats'), '', 'red'),
    switch(field('rating'), '1', 'green', '2', 'red', '3', 'green', '4', 'black' ,'5', 'black', 'green')
)
chaley is offline   Reply With Quote