Dear community,
In an xls-form I want to put the following condition in the choice filter:
If question a was answered, then don't show a certain option in the choices of question b.
In detail:
The questionaire is designed as followed:
Q1: Main question with 5 Options
Q1.1. Detailed Options for Option 1 in Question 1 (if Q1=1)
Q1.2. Detailed Options for Option 2 in Question 1 (if Q1=2)
Q2: Follow-Up Question to Main Question Q1, based on choices in Q1, Q1.1. and Q1.2.
I used the one list for all questions. In this list, options 1-5 are answer to Q1, options 6-10 are answers to Q1.1. and options 11-15 are answers to Q1.2.
I used a choice filter to limit the apperaing options.
For Q2 I want to show all the answers selected in the previous questions.
However, I would like to exclude Q1=1 and Q1=2, as they are redundant, if they were specified in Q1.1 and Q1.2
I tried the following in the choice filter column:
selected(${Q1}, name) or if(${Q1.1}!=''), name !='1', name) or if(${Q1.2}!=''), name !='2', name)
or as another approach:
selected(${Q1}, name) or if(selected(${Q1.1}, ***), name !='1', name) or if(selected(${Q1.2}, ***), name !='2', name)
*** is supposed to be a place holder for expressing "any" -> what is the correct xpath-expression?
Which expression do I have to put for ***?
See my xls-form attached:
Example Form.xlsx (12.6 KB)