Derived lists are lists that are pulled in (or derived) from a previous question or table. These lists are used in subsequent questions by referencing the original question's ID along with the specific list type, such as options, rows, columns, or ranks.
1. Which of the following stores have you visited in the last six months?
type: checkbox
1. Target
2. Walmart
3. Best Buy
4. Bed Bath & Beyond
5. Lowe's
6. Home Depot
2. Which of the following stores do you enjoy visiting?
type: checkbox
optsfrom: Q1.options
Details
- Derived lists are flexible and can be used across different widget types and listcalls. This means that a list generated from one widget, such as a table, can be applied to other question types, like radio questions and ranking questions.
- When referencing a question, the identifier begins with 'Q', and when referencing a table, it begins with a 'T'.
- Derived lists also support element decorators such as
explain
anddesc
and option data decorators. - "Autoothers" in derived lists work the same as they do in inline lists and setlists. If the autoother does not receive text input and is not selected in the first instance it is shown, it will not appear in subsequent questions or tables.
- Questions can pull in derived lists that include collection headers and will maintain the list hierarchy.
- Adding
translate: n
to the source of a derived list prevents the elements from being translated in both the originating question and any subsequent questions where the derived list is used.
Tip! Derived lists should be used to pull in the entire list from a previous question. If you only need to use the selected options, you can use question label shorthand instead.
Additional examples
The following code examples show how to reference a derived list from a table's rows, columns, or a ranking question.
Reusing table rows
Row elements from one table can be used in another by applying the rowsfrom
listcall in the follow-up table. Simply reference the originating table's ID and specify the list type (e.g., 'rows'). Any order specifications from the original list, such as the randomize: y
tag, will carry over to the follow-up question or table.
Reusing table columns
Vertical scale tables ("vscales") are tables where columns act as questions, and respondents select options for each column instead of each row. In this example, T6's columns are reused in Q6A and referenced as 'T6.columns'.
Reusing ranking elements
When a ranking question has inline options and inline alternative ranks, these elements can be referenced in derived lists in subsequent questions as 'QX.options' and 'QX.ranks', respectively.
Using decorators with derived lists
All lists, including derived lists, support element decorators and custom option data decorators. This information is carried over to follow-up questions, as shown in Q8A below.
Tip! To review the basics of creating and referencing lists, see Lists and spreadsheets.
Comments
0 comments
Please sign in to leave a comment.