- Use conditions
- Canceling the sort
- Looper bound to a data source and using a programmed iteration
In french: ZoneRépétéeTrie
Allows you to:
- Sort a Looper control according to one or more attributes.
- Sort a Looper control on all its attributes.
- Cancel a sort that was performed beforehand (which means ignore the sort).
// Sort according to one of the Looper control attributes selected in a Radio Button control
CASE 1: LooperSort("NAME")
CASE 2: LooperSort("COMPANY")
CASE 3: LooperSort("CITY")
// Sort by name (in ascending order) and by date (in descending order)
LooperSort("NAME" + TAB + "-DATE")
// Sort the LOOP_Customer Looper control on all its attributes (in descending order)
// Cancels the sort that was performed in the LOOP_Customer Looper control
Sorting a Looper control according to a list of attributes Hide the details
<Result> = LooperSort(<List of attributes>)
- True if the sort was performed,
- False otherwise.
<List of attributes>: Character string
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.
Sorting a Looper control or canceling a previous sort Hide the details
<Result> = LooperSort([<Direction>]<Looper> [, <Indicator>])
- True if the sort was performed or canceled,
- False otherwise.
<[<Direction>]<Looper>>: Character string
Name of the Looper control to sort.
- If <Direction> is equal to "+", the Looper control will be sorted in ascending order (by default).
- If <Direction> is equal to "-", the Looper control will be sorted in descending order.
<Indicator>: Optional boolean
- True to perform the sort (default value),
- False to cancel a sort that was performed beforehand.
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
LooperSort 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, ...).
This page is also available for…