logo SmartSurvey / Scripting Docs
Back to Docs
Skip a Question Based on a Single Response Answer
Route respondents past a follow-up question when they select a specific option in a preceding Single Response question.
Skip Logic .q script Example 1 of 2
Full Script
script definition (.q)
*QUESTION Q1 *SR
Q1. Do you own a smartphone?
1 Yes
2 No

*QUESTION Q2 *SR
COME: Q1=1
Q2. Which brand is your smartphone?
1 Samsung
2 Apple
3 Xiaomi
4 Other
Explanation
1
Q1 is a standard Single Response question asking about smartphone ownership.
2
Q2 uses a COME condition placed on the line immediately after the *QUESTION directive. COME: Q1=1 means Q2 will only appear if the respondent selected option 1 (Yes) in Q1. If they selected option 2 (No), Q2 is skipped automatically and the survey moves to the next question.
3
The condition references the option code (1 or 2), not the label text.
The COME condition always references the numeric option code, not the label.
Multiple conditions can be combined: COME: Q1=1 | Q1=3 (OR), or COME: Q1=1 & Q2=2 (AND).