17. Allow more than one selection
Enable Allow Multiple Selection when a player can choose several rows, such as clues to compare. Use an Array variable for the output, starting with an empty Array.
1. Create an Array variable named selected_many with initial value [].
2. Add a List Box, enter selected_many in Selected Item Variable and enable Allow Multiple Selection.
3. Add the letter, receipt and disabled ledger rows. Start a running preview.
4. Click letter and receipt once each. Both should be highlighted. Click letter again to remove just that choice.
Figure 25. Two rows selected together. The output contains both stable IDs.
| Selection mode | Output |
|---|---|
| Single selection | "letter" or an empty String. |
| Multiple selection | ["letter", "receipt"] or an empty Array. |
Ordinary row clicks toggle choices in multiple-select mode; Ctrl is not required. The selected-ID Array follows selection order. If your logic cares only about membership, check whether it contains an ID rather than depending on an index.
