ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Sort item
  • Sorting a view on several items
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<Source>.SortView (Function)
In french: <Source>.TrieVue
ODBCNot available with this kind of connection
Sorts an HFSQL view by creating an index on a view item.
Example
ViewCustomer84.SortView("City,Name")
Syntax
<Result> = <Source>.SortView([<Sort item>])
<Result>: Boolean
  • True if the view was sorted,
  • False otherwise. HError returns more details about the problem.
<Source>: Source type
Name of view used.
<Sort item>: Optional character string
List of sort items found in the view. The items are separated by a comma or CR. The sort order can be specified by prefixing the string with "+" (ascending) or "-" (descending). By default, the sort is performed in ascending order ("+"). If this parameter is not specified, <Source>.SortView refers to the last item of the view used.
The possible format for this list are:
  • "[+/-]<1st item> [, [+/-]<2nd item> ]"
  • "[+/-]<1st item> [CR [+/-]<2nd item> ]"
The sorting is first applied according to the first sorting criterion, then according to the second, ... The sorting order applied is as follows: in ascending order, "a" < "u" < "é".
Hyper File 5.5 A single sort item must be specified in this parameter.
Remarks

Sort item

An index can be created on any item of the view. If the item was a key item in the data file, the order relationship that was given to it in the analysis is used (sensitivity to the case, to the punctuation, etc.).
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL ClassicHFSQL Client/Server

Sorting a view on several items

To sort a view on multiple items, you can display the records from the view in a Table control populated programmatically and use <Table>.Sort.
Attention: This solution can only be used for data files in HFSQL Classic or Client/Server format.
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help