Multiple values for enable

Everything related to the development of modules in jamovi
Post Reply
User avatar
wviechtb
Posts: 6
Joined: Tue Jul 25, 2017 1:49 pm

Multiple values for enable

Post by wviechtb »

Suppose I have a ComboBox with options val1, val2, val3, and so on. I also have a CheckBox that I want to be enabled for 2 different values of that ComboBox. So, I would like something like "enable: (val1) (val2)", but that doesn't work. Is there any way to make this work?

Best,
Wolfgang
User avatar
Ravi
Posts: 194
Joined: Sat Jan 28, 2017 11:18 am

Re: Multiple values for enable

Post by Ravi »

Hi Wolfgang,

You can use some logical operators (! for not. || for or, and && for and). So to enable the checkbox for two different values of the ComboBox you can use enable: (val1 || val2).

Note that to call a certain option in the ComboBox you have to use the following notation: nameBox:val1 so it would actually be something like this for a ComboBox enable: (nameBox:val1 || nameBox:val2).

Cheers,
Ravi
User avatar
wviechtb
Posts: 6
Joined: Tue Jul 25, 2017 1:49 pm

Re: Multiple values for enable

Post by wviechtb »

Argh -- I went through every possible iteration of enable, also trying & and |, but not && or ||. Thanks! And yes, I meant nameBox:val1.
Post Reply