Displaying a list of questions on the same page
Syntax
Put the following statement in the metadata section of the interview script:
PageName ["Text"] page(Qname1, ..., Qnamen);
Parameters
PageName
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.
Qname1 to Qnamen
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
PageName.Ask()
PageName is the name of the page.
In this example, typing:
Communication.Ask()
displays the following page:
Example output for Page keyword using default template
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.
Note that 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.
Similarly, 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.
Note 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