Hi I know this discussion thread is slightly dated, but I would like to add some points from my own experience for other users who are looking for information regarding using expressions in the
Survey Designer >>> Schema >>> Attribute >>> Relevant >>> Only when expression is verified
If 'accessibility' is a Boolean attribute, you can use
meaning that this survey attribute only appears when 'accessibility' was assessed as '1' i.e. not accessible, or you can write the following expression
meaning that this next attribute only appears when 'accessibility' was assessed as '0' i.e. accessible.
If 'accessibility' is instead a Code attribute with multiple code elements as listed in Survey Designer >>> Code Lists, you may use similar expressions as before to configure your survey such that the next attribute only appears when a certain code list element (numerical) is selected,
meaning that the next attribute only appears when 'accessibility' was assessed as '5'.
Also, to include multiple conditions for the expression, you can use simple conditional expressions
- (accessibility = '2') or (accessibility = '3')
meaning that this next attribute only appears when 'accessibility' was assessed as either '2' or '3'
If you have another code attribute (e.g. 'agriculture_type'), then you can write the following expression
- (accessibility = '2') and (agriculture_type = '3')
meaning that this next attribute only appears when 'accessibility' and 'agriculture_type' was assessed as '2' and '3' respectively.
A less common example, is if you want a question to pop up when any list element was selected in the previous question. In this case, you would write the following expression
meaning that if you select any code list element under 'agriculture_type', this next survey question will appear.
Finally, you can write the following expression to exclude certain scenarios
meaning that the next survey question will pop up as long as you select any other code element other than '3' for 'agricultural_type'. To clarify != is the notation used for 'not equals to'
Hope you will find this helpful.