Syntax validity

What is the problem? Please be detailed.
<selected(${demographic_residence}, 2, 3, 4, 5, 6)> is this code correct in syntax for conditionally showing question in relevance column in xls form

What ODK tool and version are you using? And on what device and operating system version?
creating xls form for uploading to odk aggreate
What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Probably not. selected() is used to see if a (single) string that you want to check is among those selected in a multi-select; eg selected(${answer},'blue')

Inferring that your demographic_residence is a multi-select, whose item values are '1', '2', '3', etc, then you will need to explicitly check whether each of these has been selected; eg

selected(${demographic_residence},'2') or selected(${demographic_residence},'3') or ... and so on


thank you. it worked.

1 Like