Routing rule expressions

You can find out more by watching this video demonstrating how to add expressions.

If conditions for single and multiple response questions

The conditions used for routing must return true or false.

These conditions are mainly for use in single or multiple response questions.

SymbolTextMeaningExample
=MTValue matchesIf Q1 = 3 is true when code 3 is selected in response to Q1
==EQExact value matchIf Q1 == 3 is true when code 3 is the only code chosen in response to Q1
<>NENot an exact value matchIf Q1 <> 3 is true if any other code than 3 has been selected in response to Q1 (even if code 3 has been selected as well)
<LTLess thanIf Q1 < 5 is true when the selected code has a value less than 5
<=LELess than or equal toIf Q1 <= 5 is true if the code selected has a value of 5 or less than 5
>GTGreater thanIf Q1 < 5 is true if the code selected has a value greater than 5
>=GEGreater than or equal toIf Q1 >= 5 is true if the code selected has a value of 5 or greater than 5
,OR
or
OrIf Q1 =(1, 3, 5) is true is Q1 has a value of 1,3 or 5
~TO
to
Range, from first value to second valueIf Q1 =(1~5) is true if Q1 has a value of 1, 2, 3, 4 or 5
#NUM numNumber of responsesIf Num(Q1=2) is true if two answers have been ticked for Q1

If conditions for any question

These conditions are for use with any type of question.

Q1 NAThis is true if Q1 is not asked
Q1 OKThis is true if a valid answer has been given to Q1
Q1 NRThis is true if an answer has not been recorded to Q1

Examples of If conditions

These examples show possible conditions applied to single or multiple response questions

If ConditionMeaning
Q7=2Code 2 is selected in Q7
Q3>3Any code above code 3 is selected in Q3
Q3<3Any code below code 3 is selected in Q3
Q3>=3Code 3 or above is selected in Q3
Q3<=2Code 2 or below is selected in Q3
Q7=(1,4) OR Q7=(1 or 4)Code 1 or code 4 is selected in Q7
Q7=(3~5)Code 3 or code 4 or code 5 in selected in Q7
Q7==2Only code 2 is selected in Q7 (Q7 is a multiple response)
(Q2=2 OR Q4=1)EITHER code 2 is selected in Q2 or code 1 is selected in Q4
(Q2=2 AND Q4=1)BOTH code 2 of Q2 is selected AND code 1 of Q4 is selected
(Q2=2 AND Q4=1)BOTH code 2 of Q2 is selected AND code 1 of Q4 is selected
(Q2=2 OR Q4=1) AND Q5>=10)EITHER code 2 of Q2 is selected or code 1 of Q4 is selected, and also gave an answer of 10 or above to Q5
NUM Q2=2Two answers have been selected at Q2 (Q2 would be a multi response question)
UNLESS (Q2=2)Code 2 is NOT selected in Q2
NOT(Q1=4)Code 4 is NOT selected in Q1
UNLESS (Q2=2)OR NOT(Q1=4)Either code 2 is NOT selected in Q2 or code 4 is NOT selected in Q1
Contents