PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
WinDevWebDev - Server codeWebDev - Browser codeWinDev MobileReports and QueriesWindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPadJavaPHPAjaxUser code (UMC)External languageHFSQLHFSQL Client/ServerStored proceduresHyper File 5.5OLE DBODBCNative Accesses

LooperSort_55 (Function)
In French: ZoneRépétéeTri

LooperSort_55 is kept for backward compatibility.

In this version, use LooperSort.

See the documentation for LooperSort available in WebDev 1.5.

 
Purpose

Sorts a Looper control according to one or more attributes.

Syntax

  • Syntax 1: Sorting a looper on several attributes
<Result> = LooperSort_55(<List_Attributes>)
  • <Result> is a boolean that returns the result of the sort
  • <List of Attributes> is a character string containing the name of the attributes to sort (up to 10 attributes). <List_Attributes> has the following format:
    [<direction>]<Attribute1>+TAB+[<direction>]<Attribute2>+TAB+...
  • <direction> is the sort direction (optional), it can bet set to + (ascending sort) or - (descending sort)
  • <Attribute> is the name of the attribute to sort
  • Syntax 2: Sorting a looper
<Result> = LooperSort([<Direction>]<Looper> [,<Indicator>])
  • <Result> is a boolean that returns the result of the sort
  • <Looper> is the name of the Looper control to sort
  • <Indicator> is a boolean that is used to cancel (or not) the sort
Details

<Result> is True if the sort was performed, False otherwise (invalid parameters).

Syntax 1: <Result> = LooperSort_55(<List_Attributes>)

The sort is performed on the attributes specified in <List_Attibutes>. The first attribute used for the sort is the first one specified, and so on...

In <List of Attributes>, if the sign + is displayed in front of the name of an attribute, the sort will be performed in the ascending order for this attribute.

In <List of Attributes>, if the sign - is displayed in front of the name of an attribute, the sort will be performed in the descending order for this attribute.

The sort is performed in ascending order by default.

Syntax 2: <Result> = LooperSort_55([<Direction>]<Looper> [,<Indicator>])

The sort is performed on the first 10 attributes of the Looper control, if they exist. The first attribute used for sort is the attribute found on the left side of the Looper control.

If the sign + is displayed in front of the name of the Looper control, the sort will be performed in ascending order for the 10 attributes found in the Looper control.

If the sign - is displayed in front of the name of the Looper control, the sort will be performed in descending order for the 10 attributes found in the Looper control.

The sort is performed in ascending order by default

If <Indicator> is set to True (default value), the sort is performed.

If <Indicator> is set to False, the sort is canceled.

Therefore, <Indicator> set to False is used to cancel a sort that was previously requested.

Once the sort is canceled (<Indicator> is set to False), the order of the Looper control rows is not modified but the rows added by LooperAdd or LooperInsert will not be sorted.

Notes

When a Looper control is sorted (by LooperSort), the additions performed by LooperAdd or LooperInsert take the sort into account.

The sort is not canceled by TLooperDelete , LooperDeleteAll , LooperSeek , LooperCount .

Important: if an attribute is modified (by LooperModify and if this attribute is used as sort attribute for the looper, the sort on this attribute is canceled.

Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment