How to set a control page

Compatibility:IdSurvey 7IdSurvey 8
Please notice:

This article shows how to set up a control page. This solution, although compatible, can be considered outdated for IdSurvey 8 and later versions.
In fact, IdSurvey 8 integrates Custom Alert that can be inserted in any page of the questionnaire to make any kind of consistency check of the answers. With Custom Alert you can customize texts in a similar way as you can do with question texts, with full support for text piping and dynamic text.
See the Custom Alerts article for more details.

 

A control page verifies the coherence of answers given to previous questions.
The page is displayed only if the an incoherence is detected, and it helps respondents to correct wrong answer.

Example

In this example we ask how many employees the company where the respondent works has.
In the next question we ask how many of those employees are men and how many are women.

The control page verifies that total of men and women is the same as the number inserted in first question.

Here’s a preview of the questions as they are displayed to the respondent:

P1
Q1 – How many employees has the company you’re working for?

P2
Q2 – How many of these 10 are women and how many are men?

Men       

Women  

Pcontrol
Qc – Hey! There’s an error.
You said your company has 10 employees but then you indicated 6 men and 5 women.
Please correct wrong answer

 Correct total number of employees

 Correct number of women or men

In this example we have 3 different pages. The first page includes an open end question. The second page includes a grid with 2 open ended rows. To run a coherence check we need a third page: a control page. Using a display condition, this page will appear only if the sum of men and women will not match the total number indicated in previous question.

Also, using Text Piping, we can display in the text of question Q2 and Qc the values inserted in previous questions, making clear to the respondent where the incoherence is. The two single select options of question Qc make the respondent jump back with a skip condition to the answer that needs to be corrected.

Display conditions on Pcontrol

Page Pcontrol has to be displayed only if answer of question Q1 is different than sum Q2.1 + Q2.2

if( [Q1] != ([Q2.1]+[Q2.2]) )

Thisfunction performs math calculations. In this case it sums the answers of question Q2, which is sum of men and women indicated.
Symbol != means “different than”.

So, if Q1 is different than sum of Q2.1 + Q2.2, the page will be displayed.

Skip condition

In the two single select options of control page you have to set skip conditions to make the respondent jump back to the answer that needs to be corrected.

So, if the respondent clicks on “Correct total number of employees”, IdSurvey will jump back to question Q1; if the respondent clicks on “Correct number of men and women”, IdSurvey will jump back to Q2.

Correct total number of employees GoTo (Q1, Pcontrol)
Correct number of women or men GoTo (Q2, Pcontrol)

In the skip condition you have to write GoTo followed by the code of the question that has to be displayed.

In this example there is a second code after the comma (Pcontrol) that represents the page that will be displayed subsequently. Once the respondent has corrected the answer, another control will be performed: if the sum and the value match, the control page will not be displayed and the respondent will proceed with the following questions.

Text Piping

Customizing question text (or answer text) makes the comprehension much easier. In this example we used the Text Piping to display previous answers in following question text. The control page question text says “You said your company has 10 employees but then you indicated 6 men and 5 women”. As you can see, the numbers displayed are answers given to previous questions.

To use this function in the question text you simply have to write:

You said your company has [Q1] employees but then you indicated [Q2.1] men and [Q2.2] women.

Similarly in question Q2 you display answer of question Q1:

How many of these [Q1] are women and how many are men?

/page P1
  
  Q1
 How many employees has the company you're working for?
  
  1  ->T
  
/page P2
  
  Q2 ->T
  How many of these [Q1] are women and how many are men? /rows .1 Men .2 Women /cols 1 /page P3 /F "if([Q2.1]+[Q2.2]!=[Q1])" Pcontrol Hey, there's an error!<br />You said your company has [Q1] employees but then you indicated [Q2.1] men and [Q2.2] women.<br />Correct wrong answer 1 Correct total number of employees /C "GoTo (Q1, Pcontrol)" 2 Correct number of women or men /C "GoTo (Q2, Pcontrol)"

Using this simple example you can create much more complex control pages.

To learn more on display conditions, skip conditions and Text Piping syntax please check the related articles you can find in this Knowledge Base.

Leave A Comment?