Compatibility: | IdSurvey 6 | IdSurvey 7 |
X | √ |
You can usually send a respondent out of target by activating the option “Out of target” available on the settings of the single answer option.
Using FlowScript you can send a respondent out of target based on open answers, multiple answers or any other complex condition.
In order to do that, you have to write a FlowScript with the condition and the out of target instruction:
if (condition) ot( );
If the condition is true, you are sent out of target.
To add a FlowScript click on the settings of the page.
The FlowScript will be processed when you save the page.
Note
- If you use multiple FlowScripts on the same page, these will not be processed after the out of target. We recommend to always put the out of target as the last condition if you are using more than one FlowScript on the same page.
Example on an open ended question
The respondents under 21 years old are out of target.
if ( [Q1]<21 ) ot( );
If the number entered on the open answer to question Q1 is below 21, you are sent out of target.
Example on a multiple question
The respondents that did not subscribe to Netflix or Amazon Prime are sent out of target.
if ( Q1 != 1 && Q1 != 2 ) ot( );
If on question Q1 was not selected the option with code 1 nor the option with code 2, you are sent out of target.
Example on more than one question
Here we want to interview the respondents who have an internet connection at home but did not subscribe to any of the TV streaming services.
The respondents who do not have an internet connection at home or that have an internet connection but already subscribed to a TV streaming service are sent out of target.
if ( Q1==2 || ( Q1==1 && Q2==1 ) ) ot( );
If on question Q1 the answer with code 2 was selected or if on question Q1 the option with code 1 was selected and to Q2 the option with code 1 was selected, you are sent out of target.
Note
- If you do not put it in brackets, IdSurvey will process AND conditions before OR conditions. The condition of this example can then be shortened in
( Q1==2 || Q1==1 && Q2==1
).