Developer Documentation Library > Scripting > mrScriptMetadata User’s Guide > mrScriptMetadata reference > Field definitions > Block
 
Block
The block type can be used to group a list of questions for presentation and organizational purposes. For example, you might want to group a set of demographics questions together in a block, and also include in the block any derived variables that are related to those questions.
If you are grouping questions solely for presentation purposes, you can use a Page instead.
Syntax
For clarity, each item is shown on a separate line, and optional items are indented, See also Syntax conventions.
field_name
  [ "field_label" ]
  [ [ <properties> ] ]
  [ <styles and templates> ]
  [ block ]
fields
(
<field> (; <field> )* [;] )
Parameters
field_name, field_label
See Names and labels.
<properties>
You can define custom properties for your field to store information that is not directly supported by the Metadata Model (MDM). See Custom properties.
<styles and templates>
You can use styles and templates to define the appearance of a question. See Styles and templates.
block
The block keyword is optional. However, including it generally makes your script easier to read and understand.
<field>
Defines a question inside the block question. See Field definitions.
Remarks
The full names of the questions inside the block include the name of the block itself. It is not possible to omit the name of the block from the full names of the nested questions.
For more information about writing Block questions in interview scripts, see Question blocks.
Example
The following example is of a simple block that contains two questions.
Demo "Demographics block" block fields
(
Gender "Gender of respondent" categorical [1]
{
Male,
Female
};
Age "To which age group do you belong?" categorical [1]
{
Y11_16 "11-16 Years",
Y17_20 "17-20 Years",
Y21_24 "21-24 Years",
Y25_34 "25-34 Years",
Y35_44 "35-44 Years",
Y45_54 "45-54 Years",
Y55_64 "55-64 Years",
Y65_pp "65+ Years"
};
);
In this example, the full names of the questions inside the block are Demo.Gender and Demo.Age.
See
Field definitions