- Output field: Returns one of the items by order.
<list>
<i>item 1</i>
<i>item 2</i>
<i>...</i>
</list>
<list name="name">
<i>item 1</i>
<i>item 2</i>
<i>...</i>
</list>
<loop>name</loop>
Description
Use list element when you want to provide users with a set of messages without duplicate. For example, you don't want users to be asked the same question twice when they take a quiz.
Parameter
name
The name for list is optional. For the most use cases you don't need to name a list. The only reason to do so is you need to decide whether to loop a list outside of it. See "Loop" below.
loop
Loop element must be used along with a named list. It can be placed in a cell other than one that defines list.
name
The name of list to loop with.
Examples
Example 1. List
- 3w
-
<list>
<i>Who</i>
<i>When</i>
<i>Why</i>
</list>
- 3w
- Who
- 3w
- When
- 3w
- Why
- 3w
- Why
Example 2. Named list and loop
- 1
- my 3w
-
<list name="my3w">
<i>Who</i>
<i>When</i>
<i>Why</i>
</list> - 2
- again
<loop>my3w</loop><goto>my 3w</goto>
- 3w
- Who
- 3w
- When
- again
- Who
Notes
- You can also use BrainJS to implement list or loop by yourself. However doing so is time consuming. With list and loop system automatically maintain a pointer for each list/user pair so you don't have to.