Multiple Choice List Gadgets
- Last UpdatedNov 14, 2022
- 1 minute read
You can read the current selections in a multiple-choice list using the selection() methods. This will return the replacement-texts:
!Xarray = !This.List.selection() ‑ returns selected replacement texts by default
!Xarray = !This.List.selection(‘Dtext’) ‑ returns selected display texts
To read the index numbers of the currently selected fields of a multi-choice list gadget:
!ChosenNumbersArray = !!Form.List.Val
You can read back the current Dtexts or Rtexts as an array or simply as strings:
!array = !This.List.Dtext ‑ get all the Dtexts
!string = !This.List.Rtext[3] ‑ get Rtext of the third list field
You can select fields of this list either singly (additive) or by array of Dtext or Rtext, using its select() methods:
!This.List.select(‘Rtext’, ‘Tea’)
!This.List.select(‘Dtext’, !array)