PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
TableSort_55 (Function)
In French: TableTri
TableSort_55 is kept for backward compatibility.
In this version, use TableSort.
The documentation for TableSort_55 is as follows.
 
Purpose
Sort a memory table on one or more columns
Syntax
  • Syntax 1: Sorting a table on several columns

    <Result> = TableSort_55(<List_Columns>)
    • <Result> is a boolean that returns the result of the sort
    • <List of Columns> is a character string containing the name of the columns to sort (up to 10 columns). The format of <List_Columns> is as follows:
      [<direction>]<Column1>+TAB+[<direction>]<Column2>+TAB+...
      • <direction> is the sort direction (optional), it can bet set to + (ascending sort) or - (descending sort)
      • <Column> is the name of column to sort
  • Syntax 2: Sorting a table

    <Result> = TableSort_55([<direction>]<Table> [,<Indicator>])
    • <Result> is a boolean that returns the result of the sort
    • <Table> is the name of the table to sort
    • <Indicator> is a boolean that is used to cancel (or not) the sort
Details
<Result> is set to True if the sort was successful, and to False otherwise (invalid parameters...).
  • Syntax 1: <Result> = TableSort_55(<List_Columns>)
    • The sort is performed in the columns specified in <List of Columns>. The first column used for sort is the first specified column, the second...
    • In <List of Columns>, if + is found in front of the name of a column, the sort will be performed in ascending order for this column.
    • In <List of Columns>, if - is found in front of the name of a column, the sort will be performed in descending order for this column.
    • The sort is performed in ascending order by default.
  • Syntax 2: <Result> = TableSort_55([<direction>]<Table> [,<Indicator>])
    • The sort is performed on the first 10 visible columns of the table, if they exist. The first column used for the sort is the visible column found on the left in the table.
    • If + is found in front of the table name, the sort will be performed in ascending order for the 10 visible table columns.
    • If - is found in front of the table name, the sort will be performed in descending order for the 10 visible table columns.
    • 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 (with <Indicator> set to False), the order of the table rows is not modified but the rows added by TableAdd, TableInsert will not be sorted.
Notes
  • If the table was defined as "sortable" in the editor, the table can be sorted on a column by clicking the title of the column.
  • A cell of combo box column with no selected subscript is considered as being empty.
  • TableSort_55 is used sort a table, regardless whether the table was defined as sortable or not in the editor.
  • We do not recommend that you use TableSort_55 on the calculated columns. Indeed, these columns are calculated when each row is displayed. A sort performed by TableSort_55 on these columns will only be valid for the rows already displayed.
  • For the Combo Box columns, the sort depends on the content of the combo box (and not on the subscript of the combo box).
  • The combo boxes in the tables being graphic combo boxes, the content of the combo box that will be used as sort criterion must be described by gARetrieve.
  • When the table is sorted (by TableSort_55 or by a mouse click), the additions performed in the table by TableAdd or TableInsert take the sort into account.
  • The sort is not canceled by TableDelete, TableDeleteAll, TableDisplay, TableSeek, TableAdjust, TableCount, TablePosition, TableSelect and TableSelectPlus.
  • Important: if a column is modified (input in the column or by TableModify) and if this column is sorted, the sort on the column is canceled.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment