View Single Post
Old 12-25-2020, 08:25 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
In that case:

Code:
program:
if check_yes_no('#onkobo', 0, 1, 0) then 
    'sync.png' 
else
    if check_yes_no('#onkobo', 0, 0, 1) then
        if str_in_list(field('#kobocoll'), ',', "Kobo Store", 1, 0)  then 
            'drm-locked.png'
        else
            'reader.png'
        fi
    fi
fi
I haven't used the "check_yes_no" function before, but the first parameter is the column lookup name, not the value. From your "#onkobo" column is a Yes/No column, not a column containing the name of some other column.

And for readability, not wrapping the numbers in quotes works better for me. It tells me we are after the numbers, not strings that could be something else. And then seeing them as Booleans is easier. But, I don't know what happens performance-wise.
davidfor is offline   Reply With Quote