Using "if" in SurveySolutions Designer Syntax in an enabling condition

I need a static text to appear only when the answers to questions q2, q3, q4, q5 have the value 1. The difficulty is that:

  • question q4 has itself an enabling condition where q4 only appears if value for q1 is 1
  • question q5 has also an enabling condition where q1 is 2

So if the enabling condition for the static text should is just q2=1 && q3 = 1 && q4=1 && q5 == 1, then the static text would never show, as q4 and q5 are never simultaneously answered.

I am finding difficulty finding in the SurveySolutions Syntax an equivalent to the function “if”. Then the enabling condition for the static text would read: q2==1 && q3==1 && (if q1==1, q4==1) && (if q1==2, q5==1).

Thank you in advance for your time and support.

Perhaps, you could employ a ternary operator for this purpose.

According to your description either q4 OR q5 is enabled, never both.
So your static text should show when:
q2==1 && q3==1 && (q4==1 || q5==1)

No need for if statements.