Using Gates



Gates are important elements that allow the survey designer to control the flow of the survey, determined by the answers that are given to previous questions.

To a computer programmer the SMP Gate is a simple if…then statement where a condition is tested and if true an action occurs or else, if false a different action is triggered.  Any number of conditions can be included between or / and instructions such that the following

If A is true/false, and/or,  B is true/false,  and/or  C is true/false

Then: goto/hide – Question or Control X

Else: goto – Question or Control Y


In the example that follows the following simple condition will be tested:

If respondent is a male then go to the question on male razors or, if the respondent is a female then go to the question on female razors.

Note that because their are two sets of questions, one answered by males and one by females, a freejump question type will need to be used at the end of the first set (the male set) to leap over the second set (the female set) that are not answered if the respondent is male.

Note also that you can string several gates together to build quite sophisticated routing options in your survey where the destination of the gate options is another gate.

Lets complete some examples to see how they work.

Example 1:  Many surveys include control screening questions at the start such as age and sex to determine the sample quotas and which sections of the survey to answer.  We shall use two demographic questions sex and age to determine were in the survey particular respondents are sent.

The questions that we will use in our gates look like this.




Lets start with something simple.  Firstly we wish to ask our respondent about shaving and the shavers that they use.  However there are two different sets of questions depending on the gender of the respondent.  To send the respondent to the appropriate section in the survey using the gate question type we create the following gate question.

Note: The survey questions must already have been created in order for the gate to point to them.  Therefore we recommend that survey scripters first set up all the questions of their survey before creating the logic.

To use a gate create a new question in the location that you wish to place the gate, select the question type “gate”, and then complete the parameters.  In this example we will be sending the males to a question called “Male_Razors” and the females to a question called “Fem_Razors”.

The initial Gate parameters you have just created should look like this.



First give your gate a name.  lets call it Gate1


Next we need to add some conditions that will trigger the ‘Then:” response if the condition is true, or the “Else:” response if the condition is false.


Since Males are going to the question Male_Razors and females are going to Fem_Razors the criteria will look like this.


Click on “Add condition(s)” seen circled above.



An extra button will appear “Select Condition”.  Click on this button and then click on the conditions as they appear as in the pop up window seen in the following image.

First click on “Select Condition” and all the questions in your survey prior to the placement of this gate question will appear in a drop down.  Next click on the question you wish to use, in this case “SEX”.  Next click on “answer text”, this will reveal the answers from the question SEX.  Then select the answer you are interested in, in this case “Male”, then select the condition “is” and then either true or false, in this case false.




This has built the condition:

If SEX is male, which is filled into the button heading and looks like the following:



Next we need to add an outcome if this condition is true or not true.

If the condition is true the “Then” instruction will be executed, if not true the “Else” instruction will be executed.

Note the “screenOut” is the default selection.  This will cause the survey to be exited at this point.

Filling in the rest is now easy.  If true the the Then outcome is Male_Razors and if false then the Else outcome is Fem_Razors.  The final parameter settings should now look like this.



This is a faily simple solution but the Gate question type can be used to build quite complex instructions.

Example 2.  We may not wish to speak to over 60 males because the client is testing a new razor for young men.  To achieve this we screen out old males and we do that by adding conditions to the gate condition.

To do this we need more than one gate – the first gate would screen out old males first and then send respondents to the gate that we just built to send males to male_Razor and females to Fem_razor.

The two gates would look like this.

Gate 1 – Old males are screened out, the rest goto Gate 2



Gate 2 – Males are sent to Male_Razors, females are sent to “Fem_Razors.



There are a great many combinations and possibilities that can be created using gates.  Some of the other controls that give added power to gates are:

Compute question type – first compute a new complex variable based on any number of previous questions and use this computed variable in a gate question.

Skip – a parameter of the single select question type, which can be used instead of gate or with it for added flexibility.

Freejump – which further enables you to control where in the survey you wish to send your respondent.