Setlists are lists of options that are defined separately from a question or variable widget that can be referenced in multiple widgets via listcall tags. To define a setlist, use the setlist
widget.
setlist: CAR_TYPES
randomize: y
1. Sedan
2. Pick-up
3. Minivan
4. SUV
5. Compact SUV
6. Coupe
7. Station wagon
97. Other {autoother: y}{placeholder: Specify}
Like inline lists (lists defined "locally" on a widget), each list item should have a unique numeric ID followed by a period and a space, then option text.
Details
- Setlist names (IDs) should be in all caps. Spaces are not allowed, but you can include underscores. Make sure that all setlists in a survey have unique names.
- To reference a setlist in a question or variable, include a listcall tag such as
optsfrom
,rowsfrom
, orcolsfrom
. - In r9+, setlists can be located before or after the questions and variables they are referenced in. For r8 surveys, make sure to define the setlist before any questions that reference it.
- Lists can also be built from other lists, or combinations of local options and other lists. Make sure that all option IDs are unique when combining multiple lists.
- Element decorators and option data decorators can be included after individual list options to provide additional information.
- Order tags such as
order
,randomize: y
, oralphabetize: y
can be included with setlists.
Tip! If the number of elements in your list is rather large, and/or includes multiple decorators for multiple options, consider using a spreadsheet instead.
Combining lists
There are multiple ways to combine list options from multiple lists. Two of the more common methods are shown below.
Defining a setlist from another setlist
Sometimes when a list is reused, another order is required on a follow up question. In these situations, you can define a list based off the previous list's options and include an order tag on the new list.
setlist: CITIES
randomize: y
1. New York City
2. Chicago
3. Boston
4. Los Angeles
5. Denver
setlist: CITIES_ALPHA
alphabetize: y
optsfrom: CITIES
Combining local options with another list's options
Multiple collections of options can be combined into a single list as long as the option IDs don't overlap. In the following example, the CARS options are combined with locally defined options in the CARS2 list. Since the options from CARS are listed first, they will be displayed before the local options.
setlist: CARS
1. Ford
2. Chevrolet
3. GMC
4. Jeep
setlist: CARS2
optsfrom: CARS
10. Toyota
11. Kia
12. Mercedes
97. Other {autoother: y}{placeholder: Specify}
Comments
0 comments
Please sign in to leave a comment.