Using one list in another list
You can create a shared list by using the contents of other shared lists, in much the same way that you use two or more shared lists to generate the complete response list for a question.
Syntax
In the metadata section, type:
<list_name> define {
use <list_name_1>, ...
use <list_name_n>
};
Parameters
<list_name>
The name of the main list.
<list_name_1> to <list_name_n>
The names of the shared lists you want to include in the main list.
If you combine lists that have responses in common, you must namespace the lists when you name them in the main list to ensure that each response is given a unique name. For more information, see
When the same response appears in more than one list.
Example
AllBrands define
{
use BrandList,
use OrganicBrands
};
BrandList define
{
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
OrganicBrands define
{
HelenBradley "Helen Bradley's",
KentishFarm "Kentish Farm",
NaturesWay "Nature's Way Organic"
};
Unaided "When I mention the word yogurt, which brand names do
you think of?" categorical [1..]
{
use AllBrands
};
This produces the following interview page:
This example is a variation of the one that shows how to use two or more shared lists with a question. See
Using a shared list as a response list for a question for that example.
If you might want to display subheadings to make it clear which are the organic brands and which are not, see
Subheadings with shared lists.
See also