Home > Survey Logic > (Survey Logic) Chapter 2 – Entrance (Skip) Rules

## (Survey Logic) Chapter 2 – Entrance (Skip) Rules

Back to Chapter 1 – Overview logic in SurveyToGo

About entrance rules (Also known as skip rules)

A question or chapter entrance rule control whether that question or that entire chapter is shown or not. When no entrance rule is specified for a question or a chapter, the default behavior of SurveyToGo is to display this question or chapter.

Entrance rules can be based on answers to previous questions or any other expression that you might need. If an entrance rule evaluates as true, the question or chapter will be shown. If it evaluates as false, the question or chapter will not be shown.

Adding entrance rules is a very easy process:

1. Select the question you wish to add an entrance rule for
2. Switch to the “Rules” tab
3. Write the relevant entrance rule on the “Entrance rules” text box on the top.

Sample entrance skip rules

The following sections are sample snippets that will help you to perform the most common entrance rules tasks.

(1) Display Q2 only if the answer to Q1 was the first choice

Survey Snippet

[Q1]: “What is your favorite color?” [red/green/blue]

[Q2]: “How many cigarettes per day?” [numeric]

Requirement

Display Q2 only if the answer to Q1 was red (the first answer)

Solution

Add the following entrance rule to Q2:

Explanation

The entrance rule checks the answer to Q1. If the answer is equal to “1” – which means the first choice: red – the condition evaluates to TRUE, and the question will be shown.

Survey Snippet

[Q1]: “What is your favorite color?” [red/green/blue]

[Q2]: “How are you feeling?” [good/so-so/bad]

[Q3]: “How many cigarettes per day?” [numeric]

Requirement

Solution

Add the following entrance rule to Q3:

Explanation

The entrance rule checks the answer to Q1 AND the answer to Q2. Please note the use of the && symbol to indicate a logical AND. If the answer to Q1 is equal to “1” – which means the first choice: red – AND the answer to Q2 is “bad” (the third choice). the condition evaluates to TRUE, and the question will be shown.

(2) Display Q3 only if the sum of Q1 and Q2 is greater than 12

Survey Snippet

[Q1]: “How many dogs to you have?” [numeric]

[Q2]: “How many cats do you have?” [numeric]

[Q3]: “As an owner of more than 12 pets, do you live a healthy life?” [yes/no]

Requirement

Display Q3 only if the sum of Q1 and Q2 is greater than 12.

Solution

Add the following entrance rule to Q3:

Explanation

The entrance rule checks the sum of the answer to Q1 and Q2. If the sum is greater than 12 the condition evaluates to TRUE, and the question will be shown.

Go To Chapter 3 – Validation Rules

Visit us at: http://www.dooblo.net

Categories: Survey Logic
1. March 31, 2013 at 6:43 pm

Hi,

Similar to “AND” rule, can you please provide the code for “OR” rule?
For instance what to use instead of && if we have to say when “ANY” of 1 or 2?

Thanks!

2. April 1, 2013 at 4:33 pm

Great thanks. Also can you tell the code for (not equal)?
If (equal) code is ==
(not equal) code is ?

Thanks!