Defining lists
`- lists:` is a top-level block where you define reusable option lists, grouped option lists, and scale definitions once and reference them from many questions. The same brand list, the same satisfaction scale, the same store hierarchy — authored once.
What - lists: is
A list is a named, reusable container of options or scale codes. Define it once at the top level of the survey; reference it by name from any question that needs it.
The same - lists: block holds three kinds of named entries:
| Kind | What it is | Where it’s referenced |
|---|---|---|
options: | A flat coded list — 1: Apple, 2: Sony, … | options: on single, multi, rank, openList, numberList, gridSingle (rows), gridMulti (rows), mixGrid. Also rows: on gridNumber (and cols: as a fallback when no matching scale: list exists). |
group: | A grouped list — named sub-groups, each with options | group: on single, multi, rank, openList, numberList, gridSingle (rows), gridMulti (rows). Also rows: on gridNumber. Not allowed on mixGrid — its row domain comes only from the parent options: / options.from:. |
scale: | A scale definition — used for grid columns | scale: on gridSingle, gridMulti. Also cols: on gridNumber. |
This page covers the basic shape and flat options: lists. For
deeper grouped-list patterns, see Groups.
Where it lives
- lists: is a top-level flow block — it sits at the survey
root, not inside a page or block. The recommended placement is at
the bottom of the survey, after the questions. Long lists
otherwise push the actual question code far down the file, which
makes the question tree harder to scan.
- qid: QMainRetailer
type: single
text: Where do you shop most often?
options: retailBrandsSingle
- qid: QSpend
type: numberList
text: How much do you spend per month on each category?
options: spendCategories
min: 0
# ─── List definitions live at the bottom ─────────────────
- lists:
retailBrandsSingle:
options:
1: Target
2: Walmart
3: Costco
4: Kroger
5: Aldi
6: Amazon Fresh
spendCategories:
options:
1: Groceries
2: Household essentials
3: Prepared food
4: Pharmacy
5: Pet care
The two list names — retailBrandsSingle and spendCategories —
are reusable across the survey. The questions reference them by
name without duplicating the option text.
You can have more than one - lists: block if you prefer to
group your definitions thematically (e.g. one for brand-related
lists, one for demographics).
The named-entry shape
Each entry inside - lists: is a name (your choice) followed
by a body. The body declares what kind of list it is using
exactly one of three keywords: options:, group:, or scale:.
- lists:
yourListName:
options: # ← one of: options, group, scale
1: First option
2: Second option
Naming conventions:
- The list name is arbitrary — anything that’s a valid identifier (letters, digits, underscores, no leading digit).
- Use
camelCaseor whatever convention your team prefers — be consistent. - The name must be unique across the whole
- lists:block (or across all- lists:blocks in the survey, if you author more than one).
The three body shapes
Each of the three keywords produces a different shape of list.
options: — flat coded list
- lists:
contactChannels:
options:
1: Email
2: SMS
3: Phone call
4: App notification
Used by everyday single, multi, rank, openList,
numberList, gridSingle (rows), gridMulti (rows), mixGrid.
scale: — column scale for grids
- lists:
satisfactionScale:
scale:
1: Very dissatisfied
2: Dissatisfied
3: Neutral
4: Satisfied
5: Very satisfied
familiarityScale:
scale:
1: Never heard of it
2: Heard of it, not familiar
3: Familiar, never used
4: Used in the past
5: Currently use
Used by gridSingle and gridMulti for the column dimension.
The shape is identical to options: (codes → labels) — the
difference is semantic: scale: lists are intended as the
columns of a grid, with a natural order that matters (1–5
satisfaction, top-2-box / bottom-2-box readouts, etc.).
Per-scale-code overrides (exclusive, label, anchor) work
the same way as on options:.
group: — grouped list
- lists:
groceryStores:
group:
Grocery Stores:
options:
11: Aldi
12: Kroger
Warehouse Clubs:
options:
21: Costco
22: Sam's Club
Each named sub-group has its own options:. Typical uses:
visible category headers, hidden bands that keep options grouped
under randomization, anchored sub-groups. See
Groups for the deeper patterns.
Referencing from a question
A question pulls in the list by name. Three reference forms, one per kind of list:
# Flat options list
- qid: QFavBrand
type: single
text: Which brand do you prefer?
options: retailBrandsSingle
# Grouped list (sub-headings + options)
- qid: QStores
type: multi
text: Which stores have you visited?
group: groceryStores
# Scale list (column dimension on gridSingle / gridMulti)
- qid: QSatisfaction
type: gridSingle
text: How satisfied are you with each brand?
options: retailBrandsSingle # rows
scale: satisfactionScale # columns
# gridNumber uses `rows:` and `cols:` keywords instead of options/scale
- qid: QSpend
type: gridNumber
text: How much did you spend per category in each quarter?
rows: spendCategories # accepts an options: or group: list
cols: quarters # accepts a scale: list (or options: as fallback)
label.prefix: $
min: 0
The runtime expands the named list into its full options at build
time. From the respondent’s perspective, a question with
options: retailBrandsSingle is indistinguishable from one with
options inlined directly — but from the author’s perspective, the
brand list is authored once.
Sharing a list across question types — the “None of these” pattern
A common need: most questions referencing a brand list need a
None of these opt-out, but the exclusivity of that opt-out
matters only on multi. Define the option once with
exclusive: True inside the shared list — the flag activates on
multi questions and is harmless everywhere else.
- qid: QBrandsOwned
type: multi
text: Which brands have you owned?
options: retailBrandsSingle # 99 acts as exclusive
- qid: QFavBrand
type: single
text: Which is your favourite?
options: retailBrandsSingle # 99 is just one option (single is exclusive by nature)
- qid: QPriority
type: rank
text: Rank the brands you would consider next.
options: retailBrandsSingle # 99 is just one option
# At the bottom of the survey
- lists:
retailBrandsSingle:
options:
1: Target
2: Walmart
3: Costco
97:
label: Other
specify: True
99:
label: None of these
exclusive: True
anchor: True
exclusive: True on 99 only does anything on QBrandsOwned
(the multi); on QFavBrand and QPriority it’s a no-op. One
list, three questions, one consistent opt-out.
Adding options on top of a list reference
A question can extend a referenced list with extra inline options.
Author the list name on the options: line and add the extras as
indented children below — they get merged into the question’s
final option set.
- qid: QDigital
type: multi
title: Digital features used
text: Which digital retail features have you used in the last 3 months?
layout.cols: 1
order: random
options: digitalFeatures
99:
label: None of these
exclusive: True
anchor: True
# at the bottom of the survey
- lists:
digitalFeatures:
options:
1: Mobile app shopping lists
2: Digital coupons
3: Order pickup
4: Delivery
5: Pharmacy refill reminders
The base list digitalFeatures carries the five “real” options;
the per-question addition adds 99: None of these with
exclusive: True and anchor: True. Other questions referencing
digitalFeatures without the addition stay clean — five options,
no opt-out. This is the right tool when most questions share a
list but one or two need an extra option.
When the additions are needed everywhere the list is referenced, put them inside the list itself instead — see the None of these pattern above.
One list, many question shapes
- qid: QPreferred
type: single
text: Which channel do you prefer?
options: contactChannels
- qid: QAcceptable
type: multi
text: Which channels are acceptable?
options: contactChannels
- qid: QPriority
type: rank
text: Rank the channels by your preference.
options: contactChannels
- lists:
contactChannels:
options:
1: Email
2: SMS
3: Phone call
4: App notification
One list, three questions, three different question shapes — and if marketing later adds an “in-app chat” channel, you change one place.
Per-option overrides
A list option can carry the same per-option properties as inline
options — specify, anchor, exclusive, etc. — by expanding
the entry from a string into a map.
- lists:
retailBrandsSingle:
options:
1: Target
2: Walmart
3: Costco
97:
label: Other
specify: True
99:
label: Prefer not to say
anchor: True
| Per-option property | Meaning |
|---|---|
label | The display label (required when expanding to a map). |
specify | True — attach a free-text entry to this code. |
anchor | True — pin in place under order: random. |
exclusive | True — selecting this code clears all others (for multi). |
These overrides travel with the list — every question that
references retailBrandsSingle gets the same Other specify
behavior on code 97.
See also
- Groups — grouped lists and scale definitions
- Masking —
options.fromfor runtime-driven option lists - single — typical consumer of an
options:list - multi — same
- gridSingle — uses both
options:(rows) andscale: