Matching Syntax within Enabling Condition: 1 Condition + 1Macro

Dear all,

I have a question on which I want to put an enabling condition saying basically: “only show this question if the one question (in the survey) matches certain answer options AND if the prior questions matches certain answer options”.

In other words: the enabling condition needs to contain a macro $cropvc_1 || $cropvc_2 || $cropvc_3 (1st condition) AND the operator crops_time !=7 (2nd condition).

Can I combine both condition in one single enabling condition in Survey Designer? I have tried the following two, but both dont work:

$cropvc_1 || $cropvc_2 || $cropvc_3 && crops_time !=7
$cropvc_1 || $cropvc_2 || $cropvc_3 && crops_time.ContainsAny(1,2,3,4,5,6)

I am thankful for any suggestions!

Judging from your description probably putting parentheses should work:

($cropvc_1 || $cropvc_2 || $cropvc_3) && crops_time !=7

i.e. either of 1, 2 or 3 AND always time different from 7

1 Like

Clearly this may be sensitive to the content of the macros, which are not shown.
To be on the safe size I’d suggest a stronger form of the condition:

(($cropvc_1) || ($cropvc_2) || ($cropvc_3)) && (crops_time !=7)
1 Like