logo SmartSurvey / Scripting Docs
Back to Docs
Operator
& AND Logical
&
Symbol &
Category Logical
Precedence 2 (lower than comparison)

Logical AND. Both the left and right conditions must be true for the combined expression to be true. Used to combine multiple conditions that must all hold simultaneously.

Syntax
syntax
condition1 & condition2
Examples
expressions
Q4>=18 & Q4<=34            -- age is between 18 and 34
Q1=1 & Q2=3                -- chose brand A and also selected option 3 in Q2
valueof[Q7.1]>=4 & valueof[Q7.2]>=4   -- both rows rated 4 or above
Use a single & (not &&). The SmartSurvey scripting engine uses single-character logical operators.
Parentheses can be used to group conditions: (Q1=1 | Q1=2) & Q4>=18
Related