Professional > Interview scripting > Writing interview scripts > Shared lists > Subheadings with shared lists > Subheadings using “sublist”
 
Subheadings using “sublist”
If you have shared lists that you load into questions with use, you can use the sublist keyword to mark lists whose responses are to be treated as a single group or sublist within the response list as a whole:
Syntax
Name "Question text" categorical [NumResps]
{
  use
ListName1 sublist ["Subheading1"],
  ...
  use ListNamen sublist ["Subheadingn"]
};
Parameters
Name
The question name.
ListName1 to ListNamen
The names of the shared lists you want to include in the question’s response list.
Subheading1 to Subheadingn
Optional subheadings to be displayed above the shared lists.
Example
BrandList define
{
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
OrganicBrands define
{
HelenBradley "Helen Bradley's",
KentishFarm "Kentish Farm",
NaturesWay "Nature's Way Organic"
};
TVAds "Which brands of yogurt have you see advertised
on TV?" categorical [1..]
{
use BrandList sublist "Non-organic brands",
use OrganicBrands sublist "Organic brands"
};
Notes
If you use a shared list as a sublist for a number of questions and you always want to use the same subheading text, you can include the subheading text as part of the list’s definition and omit it from the individual uses. The list’s definition becomes:
Name "
SubheadingText
" define
{
  ResponseName1 [ResponseText1],
  ResponseName2 [ResponseText2],
  ...
  ResponseNamen [ResponseTextn]
};
You can rewrite the previous example as follows and still achieve the same page layout as in the illustration.
NonOrgYogs "Non-organic brands" define
{
Alpine,
Finborough,
Alsace,
DairyFresh "Dairy Fresh"
};
OrgYogs "Organic brands" define
{
HelenBradley "Helen Bradley's",
KentishFarm "Kentish Farm",
NaturesWay "Nature's Way Organic"
};
PrintedAds "Which brands of yogurt have you seen
advertised in magazines or newspapers?" categorical [1..]
{
use NonOrgYogs sublist,
use OrgYogs sublist
};
If a shared list is defined with one subheading text and is then used as a sublist with a different subheading, the subheading defined with sublist overrides the subheading defined in the define statement. If a shared list is defined with an integral subheading and you want to use the list without a subheading, just enter a null text (two consecutive double quotation marks) after the sublist keyword for that list. For example:
RadioAds "Which brands of yogurt have you heard
advertised on the radio?" categorical [1..]
{
use NonOrgYogs sublist "",
use OrgYogs sublist ""
};
to display the lists of yogurt brands without their subheadings.
See also
Subheadings with shared lists