Allows sorting a Looper control according to one or more of its attributes.
// Sort according to one of the Looper control attributes selected in a Radio Button control
CASE 1: LOOP_Customer.Sort("NAME")
CASE 2: LOOP_Customer.Sort("COMPANY")
CASE 3: LOOP_Customer.Sort("CITY")
Sorting a Looper control according to a list of attributes Hide the details
<Result> = <Looper control>.Sort(<List of attributes>)
- True if the sort was performed,
- False otherwise.
<Looper control>: Control name
Name of the Looper control to be used.
<List of attributes>: Control name
Name of the attributes according to which the Looper control will be sorted (up to 10 attributes). This character string must have the following format:
[<Direction>]<Attribute 1> + TAB + [<Direction>]<Attribute 2> + TAB + ...
- <Direction>: sort direction (optional), can take the following values:
- "+": the sort will be performed in ascending order (default value).
- "-": the sort will be performed in descending order.
- <Attribute>: name of the attribute used for the sort.
In browser code, the sort can be performed on a single attribute only.
can be used on:
- a Looper control based on a data file,
- a Looper control populated programmatically.
This function is not available for Linear Looper controls. This function is available for Looper controls in browser mode only.
This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.
Looper bound to a data source and using a programmed iteration
<Looper>.Sort does not work on a Looper control with the following characteristics:
- Looper control bound to a data source,
- Looper control that uses Browse programmatically ("Content" tab in the control description window).
To change the display order of a Looper control with programmed browse, you must adapt the code found in the different read processes of the Looper control (process for reading the first one, the next one, the previous one, ...).