Dynamic lists

Introduction

Dynamic lists are specialized lists compiled on the fly based on logic you define, meaning they can change per respondent.

In Discover, lists and questions are separate entities — questions use lists, but lists don't belong to the questions that use them. This distinction matters because dynamic lists are built in relationship to other lists.

The most common use of dynamic lists is to display items a respondent chose in one question as the options in a follow-up question, using the carry forward function.

How dynamic lists work

Dynamic lists are built with instructions that are evaluated when the question the list is applied to is encountered. Three things to keep in mind:

  • The list starts empty and is filled using functions such as carry forward and add.
  • Dynamic lists are built within the landscape of a source list — a master list of all items that could possibly appear.
  • Instructions are evaluated in the order they appear, so sequence matters. For example, to randomize a list, you must first add items, then apply the randomize function.

Source list

The source list is the standard list that defines the landscape of a dynamic list — it determines which items could appear, not necessarily which will. A dynamic list can only have one source list. Dynamic lists can reference other dynamic lists as their source, as long as all share the same original source.

Creating a dynamic list

Simple example

This example uses the carry forward function to display a respondent's selected music genres in a follow-up question.

  1. Create a multi-select question with several items and name the list "Music genres."

    Multi-select question that asks
  2. Create a new single-select question as the follow-up.
    Single select question that asks
  3. Open the list dropdown on the follow-up question and click the new dynamic list icon (Dynamic List, New) next to "Music genres." This opens the list manager with the new dynamic list as a child of the source list.
    List dropdown at the top of the question is opened. The
  4. Add the Carry forward items instruction, choose the From question, select Selected by the respondent, and click Done.
    The list manager is open to the music genres dynamic list. The instruction has been created with the criteria listed in step 4 above.
The single select question is again shown with the dynamic list applied.

When respondents take the survey, they first select the genres they listen to — and only those selections appear in the follow-up question.

Compound example

Sometimes multiple instructions are needed. For example, to carry forward items while preventing a specific item like "None of the above" from appearing:

  1. Use Carry forward or Add to populate the list.
  2. Add a Remove instruction to exclude the unwanted item.

Since dynamic lists start empty, the add or carry forward instruction must always come before remove.

The list manager is opened to the list with the functions described above applied.

Available functions

Function Use
Carry forward Brings items from one question into another based on respondent selections
Add Ensure specific items are included in the list
Remove Prevent specific items from being included in the list
Randomize Randomize items added from the preceding instructions
List length Ensures the list meets a minimum, maximum, or exact item count
Custom (JavaScript) Write custom list logic using JavaScript

Carry forward

Brings items from a previous question into the current list based on respondent selections. Common uses include:

  • Asking follow-up questions about items selected in a multi-select question.
  • Combining answers from multiple questions into a single list, provided all questions reference the same source list.
  • Ordering items from a ranking question (best to worst) or a constant sum question (highest to lowest score).

To quickly carry forward, open the list dropdown and select Carry forward items, then choose the Source question and which items to bring forward. After this, you can select a question to bring items from.

Note: items specified in the item selection dropdown are joined with OR logic — if a respondent selected any of the specified items, that item is carried forward.

Add

Ensures specific items are included in the list regardless of respondent selections. Common uses include:

  • Adding all items to a list before applying randomize or remove instructions.
  • Ensuring specific items always appear — for example, brands owned by your company in a follow-up question where other brands are carried forward based on familiarity.
  • Creating multiple list subsets from a single source that all appear together in analysis. For example, a "Landmarks" source list could produce two dynamic lists — "Landmarks in the United States" and "Landmarks in Mexico."

Remove

Prevents specific items from appearing in the list. Common uses include:

  • Excluding text entry or exclusive options such as "None of the above" from a follow-up question.
Since dynamic lists start empty, always use add or carry forward before remove to ensure the list is populated first.

Randomize

Randomizes the items added by preceding instructions. The same randomization pattern is applied each time the list is encountered.

Note: when a dynamic list is used on a question, the randomize setting in question settings is disabled — use this function instead.

Since dynamic lists start empty, always use add or carry forward before randomize. Also note that the randomize function only affects items added by instructions that precede it. Items added after the randomize instruction will not be randomized.

List length

Ensures the list meets a defined length. Three operators are available:

  • At most: Sets a maximum. Items beyond the limit are cut from the bottom of the list.
  • At least: Sets a minimum. If the list is too short, unused items from the source list are added at random until the limit is reached.
  • Exactly: Combines both — items are added or removed as needed to reach the defined count.

Note: when random items are added using at least or exactly, exclusive and text entry items are never chosen.

Custom (JavaScript)

For list logic beyond what the built-in functions support, use the custom JavaScript option to write your own logic in a code editor. Script versions of the built-in functions are also available for use in custom code. See the Script functions for lists article for syntax and usage details.

Press Ctrl + Space to view all available survey variables while writing custom code.

List behavior

  • A list item will never appear twice, even if multiple instructions would result in it being added more than once.
  • Items in a dynamic list are recorded using the same numeric values as the source list. If "Blue" is item 3 in the source list, it is recorded as 3 in the data export regardless of its display position.
  • If a dynamic list evaluates to empty, the question it is applied to is skipped automatically.
  • Questions that would result in all items requiring a response are skipped automatically. For example:
    • If a required single-select question has only one item, that item is selected automatically and the question is not shown. 
    • Similarly, if a required multi-select question with a minimum of three selections has three or fewer items available, all items are selected and the question is skipped.
  • If a list includes a text entry item, its behavior in carry forward depends on the instruction used:
    • Carry forward selected items: If the respondent typed an answer, what they entered appears in the follow-up.
    • Carry forward unselected items: The text entry appears as a blank input field.
    • Carry forward followed by Add: The text entry appears as a blank input field, not the respondent's typed answer.