Question blocks
Use a question block to define a set of related questions that you want to keep together as a group. During interviews, all questions in the block are displayed on the same page in the order they appear in the block. Demographic questions are typically defined as blocks.
Defining a question block
Put the following statements in the metadata section of the interview script:
<block_name> ["<text>"] block fields
(
<questions>
);
Parameters
<block_name>
The name of the question block.
<text>
The text to display at the top of the block.
<questions>
Questions defined in the usual way.
Example
AboutYou "" block fields
(
Age "How old are you?" long [18..99];
WorkStatus "Do you work ...?" categorical [1]
{
Fulltime "Full time",
Parttime "Part time"
};
Dept "Which department do you work for?" categorical [..1]
{
CustomerService "Customer Services",
Facilities "Facilities",
Finance "Finance",
HumanResources "Human Resources",
IT "IT",
Sales "Sales/Marketing"
};
);
Displaying the question block
To display the question block, type the following statement in the routing section:
<block_name>.Ask()
where <block_name> is the name of the question block.
Example
AboutYou.Ask()
IOM.GlobalQuestions.Add(ChangeTemplate)
ChangeTemplate.Style.Orientation = Orientations.orRow
ChangeTemplate.Style.Rows = 2
produces the following output:
Questions in a block are automatically namespaced, which means that their full names include the name of the block. In the example, the questions are called AboutYou.Age, AboutYou.WorkStatus, and AboutYou.Dept.
See also