PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Sort
  • Looper linked to a data source and using a programmed browse
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Allows sorting a Looper control according to one or more of its attributes.
Example
// Sort according to one of the Looper control attributes selected in a Radio Button control
SWITCH RADIO_RADIO1
CASE 1: LOOP_Customer.Sort("NAME")
CASE 2: LOOP_Customer.Sort("COMPANY")
CASE 3: LOOP_Customer.Sort("CITY")
END
Syntax

Sorting a Looper control according to a list of attributes Hide the details

<Result> = <Looper control>.Sort(<List of attributes>)
<Result>: Boolean
  • True if the sort was performed,
  • False otherwise.
<Looper control>: Control name
Name of Looper control to use.
<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 + ...
where:
  • <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.
Versions 17 and later
WEBDEV - Browser code In browser code, the sort can be performed on a single attribute only.
New in version 17
WEBDEV - Browser code In browser code, the sort can be performed on a single attribute only.
WEBDEV - Browser code In browser code, the sort can be performed on a single attribute only.
Remarks

Use conditions

<Looper>.Sort can be used on a browsing or memory Looper control.
WEBDEV - Browser code This function is not available for the Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.

Sort

The sort will be taken into account during the next addition of a row into the Looper control (<Looper>.Add, <Looper>.AddLine, <Looper>.Insert and <Looper>.InsertLine).

Looper linked to a data source and using a programmed browse

<Looper>.Sort does not operate on a Looper control with the following characteristics:
  • Looper control linked to a data source,
  • Looper control that uses Programmed browse ("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, ...).
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment