To order list options with the scheme from another widget, use the orderfrom
tag. The orderfrom
tag accepts a question label or list name as an input. It then applies the ordering from the referenced widget. The list or question label referenced by orderfrom
must have an order
or randomize
tag to parse successfully.
Caution! The widget containing the orderfrom
tag and the referenced widget should both have the same number of options. If they do not, some options may not display.
Syntax
2. Question type: radio series: 1..5 orderfrom: Label of ordered widget
Example
Reuse ordering from a prior question
In the following example, the order
tag on Q1 uses '[*]' as an input, so the options will be randomized. Because of the orderfrom
tag, Q2 will then have the same option order as Q1.
Reuse ordering from a list
The orderfrom
tag can also reference set lists with a defined order, as shown below.
Tables — 'row order from' and 'col order from'
When used in a table, the orderfrom
tag will re-order the table's options list only. To re-order the rows or columns of a table, use the variants row order from
and col order from
. These tags will apply the ordering from the widget specified to the table's rows and options, respectively.
In this example, the rows appear in the same order as the options from the MY_LIST widget because it is the input specified in the roworderfrom
tag.
Inline as a decorator
The orderfrom
tag may also be used as a decorator on a list call (optsfrom
/rowsfrom
/colsfrom
). To do this, use square brackets.
Comments
0 comments
Please sign in to leave a comment.