Enable questions on the basis of responses to questions in a roster

Hi I have roster based on a previous multi select question. The roster has some single select questions. I want to enable some questions right after the roster on the basis of the response to the questions in the roster.
For eg
Roster has three items A, B and C. And two questions of yes/no type. (Question 1 and question 2). I now have a question 3 that I want to enable when response to question 1 or question 2 is yes.
How can I achieve this?


When you put two questions Q1 and Q2 into a roster of three items A,B,C, you no longer have two questions, you have six questions:

Q1A, Q1B, Q1C, Q2A, A2B, Q2C

And so you can no longer say whether Q1 is equal to yes or no. Because it is a vector, and you can’t compare it with a scalar.

Since you don’t show the actual questionnaire, it is not possible to determine what to advice further.

See also here

So to put it more clearly. I want a question after the roster to be enabled is the vector of responses has all the elements to be “yes”. That is all six responses are yes.
How can I implement this?

Assuming answers YES are coded as 1, try:

ROSTER.All(x=>(x.Q1=1 && x.Q2==1))

See examples e.g. here:

1 Like