Returns the index of the selected element in a Looper control. The selected element corresponds to the current row on which the selection bar is displayed.
Remark: <Looper>.Select can be used on:
- a Looper control based on a data file or populated programmatically.
- a single-selection or multi-selection Looper control. For multi-selection Looper controls, <Looper>.Select must be used in a loop in order to retrieve all selected rows.
// Index of the selected row in "LOOP_Product"
ResSelect = LOOP_Product.Select()
// Rows selected in a multi-selection Looper control populated programmatically
i is int
NbSelected is int = LOOP_Looper1.SelectCount()
FOR i = 1 TO NbSelected
Trace("Selected element: " + LOOP_Looper1.Select(i))
END
Syntax
<Result> = <Looper control>.Select([<Rank>])
<Result>: Integer
- Index of the selected row in the specified Looper control,
- -1 if no row is selected.
<Looper control>: Control name
Name of the Looper control to be used.
<Rank>: Optional integer
Rank of selection for a multi-selection Looper control.
If this parameter is not specified, the index of the first selected row is returned.
For example, to retrieve the first selected element, <Rank> = 1.
To retrieve the second selected element, <Rank> = 2, ...