In this article
Call Blocks are elements that enable you to group questions and other objects together such that the grouped objects can be processed specially or separately within the Survey tree. Several types of Block element are available:
- Blocks - There are two types of Blocks; those that are located within the Survey routing and which are used to group questions for processing, and those that are placed outside the Survey routing which contain sets of questions that are called by Call blocks.
- The Block element within the routing enables you to group questions together and apply for example randomization and/or rotation to the questions within the block. This is standard survey functionality that is used frequently in market research to avoid bias in responses, which can arise as a result of the order in which the questions are presented. In addition to normal questions. Blocks can contain complex structures such as conditions and loops, and it is also possible to nest Blocks - , as shown in the example below. Here the Entertainment block contains three other blocks, each with questions in them. The blocks will have single page breaks.
- The Call Blocks folder in the Survey Tree ( ) allows you to set up groups of questions outside of the Survey routing. These blocks are similar to the blocks described above and are intended to contain individual questions or sets of questions, but they are not part of the standard Survey routing. This means that these blocks and their contents will not be executed automatically when a respondent answers the survey, but must be activated by a Call Block object placed in the Survey tree. When the respondent works their way through the Survey and they come to a Call Block object, the Call Block will divert the survey flow to the specified Block. Once the contents of the Block have been processed, the Survey routing will return automatically to the point in the routing immediately after the Call Block, and the Survey will continue.
Figure 1 - Blocks within blocks
Figure 2 - The Call Blocks folder in the Survey tree
Any number of "external" Blocks can be added to the routing, these can be called at any time during the survey, and the same Block can be executed any number of times by different Call Blocks in the Survey tree. For the questions inside the block, any answers entered during previous executions of the block will remain. The Call Block objects can themselves be activated by for example scripting within other questions in the tree. The Call Blocks folder in the routing contains two "special case" blocks by default: Start Block and End Block - see below for descriptions.
Note: The use of scripted Redirect() to jump into or out of questions that are in Call Blocks will cause problems and should not be attempted. A key attribute of Call Blocks is that they can be entered from multiple points in a survey (see above), so the survey engine will not have a specific “entry-point” that has been used to enter that Call Block. Therefore when the Call Block finishes it does not know where in the main body of the survey to return to, and the survey will simply error.
- Start Blocks - a Start Block is a special type of Block that will ALWAYS be activated at the beginning of a survey/interview. Any questions or other objects located within the Start Block will always be the first things that are processed when the respondent starts the Survey. The Start Block will be presented to the respondent whenever he/she enters the Survey for first time, and whenever the respondent returns to the Survey after a postponement unless the Web Option "Allow respondents to change their original answers" is disabled (go to Web Options for more information). On returning to the Survey, the Start Block will present the answers that the respondent has entered previously. The respondent can then change those answers as required. A Start Block cannot be deleted from the Survey tree. If no questions are added to the Start Block, then it will be ignored.
- End Blocks - an End Block is a special case Block that will ALWAYS be activated at the end of a survey/interview. Any questions or other objects located within the End Block will always be the last things that are processed when the respondent completes the Survey. The questions contained within the End Block will be presented to the respondent whenever he/she leaves the interview, either due to postponement or because the Survey is completed. If the respondent returns to the interview later, and again leaves it for any reason (perhaps this time the Survey is completed), then the questions in the End Block will present the answers that the respondent has entered previously. The respondent can then change those answers as required. An End Block object cannot be deleted from the Survey tree. If no questions are added to the End Block then it will be ignored.
- Call Blocks - Call Blocks are used to call or activate a Procedure Block. You can place a Call Block anywhere within the Survey routing. When the respondent works their way through the Survey and reaches the Call Block, the Call Block diverts the routing to the specified Procedure Block and the questions within that Procedure Block are presented to the respondent. Once the respondent has answered the questions in the selected Procedure Block, he/she is returned to the Survey, to the point at which they left it to process the Procedure Block. The respondent can then continue with the Survey. You can add as many Call Blocks as you wish to a Survey. These Call Blocks can then refer to any Procedure Blocks, and can specify the same Procedure Block more than once.
Important
Background variables (go to Background Variables for more information) only have "values" once the respondent has passed them in the survey (and provided the necessary answers). Until this point, the variables are regarded as being empty if they are used in text substitution or scripting. Special care must therefore be taken when creating surveys that include a Start Block if background variables are needed in the Start Block. The background variables MUST then be placed at the beginning of the Start Block such that they are passed first when the interview opens.
Note: The Block, Start Block, End Block and Call Block functionality is only available when the survey uses the Optimized Database format (go to Optimized Database Format for more information).