Using a shared list as a response list for a question
To use a shared list as the response list for a question, put the following statement in the metadata section of the questionnaire:
Syntax
<question_name> "<text>" categorical [<number_of_responses>]
{
use <list_name>
};
Parameters
<number_of_responses>
The number of responses that can be chosen, as for a standard categorical question.
<list_name>
The name of the list you want to use as the response list for the question.
Example
BrandList define {
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
IceCreamKnow "Which brands of ice cream can you name?"
categorical [1..]
{
use BrandList
};
IceCreamBuy "Which brand of ice cream do you usually buy?"
categorical [1..1] {
use BrandList
};
Both questions use the same response list but the first one allows a multiple choice answer, whereas the second one allows only one answer to be chosen.
Using multiple share lists
You can build a question’s response list using more than one shared list, or by combining a shared list with other categorical responses. To do this, enter one use statement for each shared list and separate these statements with commas. The following example defines separate lists for organic and non‑organic brands, but uses the two lists to generate the brand list for the unaided awareness question.
BrandList define
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
OrganicBrands define
HelenBradley "Helen Bradley's",
KentishFarm "Kentish Farm",
NaturesWay "Nature's Way Organic"
};
DessertKnow "Which brands of frozen desserts can you name?"
categorical [1..]
{
use BrandList
use OrganicBrands
};
The page that the interviewing program displays is as follows:
This example works because the two lists contain responses with different names. If you try to use two lists that contain one or more responses with identical names, you will need to use namespacing to ensure that each of those responses is saved with its full name in the questionnaire definition (
.mdd) file. For more information, see
When the same response appears in more than one list.
Combining a shared list with other categorical responses
This example creates a response list by combining a shared list with other categorical responses.
DessertBuy "Which of the following brands do you usually buy?" categorical [1..]
{
use BrandList
use OrganicBrands
None "None of these" exclusive fix
};
The interview page is as follows:
See also