Displaying a list of questions on the same page
Syntax
Put the following statement in the metadata section of the interview script:
<page_name> ["<text>"] page(<question_name_1>, ..., <question_name_n>);
Parameters
<page_name>
The page name. This is the equivalent of a question name and you use it in the routing section when you want to display the page.
<text>
Text to display at the top of the page.
<question_name_1>, ..., <question_name_n>
The names of the questions you want to display on the page.
Example
CommState "Over the last year, would you say that communication
in the company has" categorical [1..1]
{
Improved,
Same "Stayed the same",
Worse "Got worse"
};
CommStateWhy "Why do you think this is?" text;
Communication page (CommState, CommStateWhy);
Displaying the page during the interview
Use this command in the routing page
<page_name>.Ask()
<page_name> is the name of the page.
In this example, typing:
Communication.Ask()
displays the following page:
The advantages of using page to display multiple questions on a page are as follows:
▪The questions can be defined anywhere in the metadata section.
▪Changing the order of questions on the page or replacing one question with another is simply a case of editing the page statement.
The page keyword controls the way questions are displayed; it does not affect the way questions are held in a project’s metadata or the way the case data is stored. So, if you ask a question once by displaying it on a page by itself and then again by displaying it using a page statement, the second presentation is treated as a repeat of the question. The question is displayed with the original responses shown, as is the case when a respondent snaps back to a previous question. If the respondent changes the answers for the question, the new answers overwrite the previous answers in the case data.
If the same question appears on more than one page statement, but different respondents see each page, only one set of metadata is stored for the question and only one column is allocated to the question in the case data database. The fact that the question appears with different questions for different respondents is irrelevant.
UNICOM Intelligence Professional moves page statements to the end of the metadata section when close and reopen the .mdd file. This does not affect the way the script works.
See also