PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Taking the sort order into account
  • Characters taken into account for the punctuation and the spaces
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
..SortOption is used to find out and modify the sort options used in:
  • the text columns found in Table controls,
  • the text columns found in TreeView Table controls,
  • the List Box and ListView controls,
  • the Combo Box controls,
  • Versions 15 and later
    WEBDEV - Server code the attributes of Looper controls,
    New in version 15
    WEBDEV - Server code the attributes of Looper controls,
    WEBDEV - Server code the attributes of Looper controls,
  • Versions 16 and later
    WEBDEV - Server code the images, the clickable images and the thumbnails with automatic scroll.
    New in version 16
    WEBDEV - Server code the images, the clickable images and the thumbnails with automatic scroll.
    WEBDEV - Server code the images, the clickable images and the thumbnails with automatic scroll.
This property can only be used on the "memory" controls. It is not available for the "browsing" controls. These sort options can be defined in the window editor or in the page editor, in the "Details" tab of control description.
Example
// Sorts a list while respecting the numeric order
LIST_Turnover..SortOption = ccRespectNumeric
Syntax

Finding out the sort options used Hide the details

<Sort options> = <Control name>..SortOption
<Sort options>: Integer constant
Sort option currently applied:
ccLexicographicOrderSort the character strings in lexicographical order (for example, the 'é' character is found between the 'e' and 'f' characters)
ccNormal
(Default value)
Standard comparison, similar to the = operator
ccRespectNumericSort while taking into account the numeric values inside the strings (in this case, "10" comes after "9").
ccIgnoreAccentSort while ignoring the accented characters
ccIgnoreCaseSort while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceSort while ignoring the space characters found before and after the character strings
ccIgnorePunctuationAndSpaceSort while ignoring the punctuation and the space characters (see the Notes for more details)
sortDefaultSort while ignoring the case and the accented characters and while taking the space characters into account
sortWithoutFunctionGxxxSort while ignoring the elements such as gImage, gLink, ... By default, these elements are taken into account by the sort.
<Control name>: Character string (with or without quotes)
Name of control to use.

Modifying the sort options Hide the details

<Control name>..SortOption = <Sort options>
<Control name>: Character string (with or without quotes)
Name of control to use.
<Sort options>: Combination of Integer constants
Sort option that will be applied to the control:
ccLexicographicOrderSort the character strings in lexicographical order (for example, the 'é' character is found between the 'e' and 'f' characters)
ccNormal
(Default value)
Standard comparison, similar to the = operator
ccRespectNumericSort while taking into account the numeric values inside the strings (in this case, "10" comes after "9").
ccIgnoreAccentSort while ignoring the accented characters
ccIgnoreCaseSort while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceSort while ignoring the space characters found before and after the character strings
ccIgnorePunctuationAndSpaceSort while ignoring the punctuation and the space characters (see the Notes for more details)
sortDefault (cannot be combined)Sort while ignoring the case and the accented characters and while taking the space characters into account
sortWithoutFunctionGxxxSort while ignoring the elements such as gImage, gLink, ... By default, these elements are taken into account by the sort.
Remarks

Taking the sort order into account

  • For the List Box and Combo Box controls, the sort order specified by ..SortOption is immediately taken into account.
  • For the columns found in the tables or in the treeview tables, TableSort must be called in order for the specified sort order to be taken into account. For example:
    COL_Name..SortOption = ccLexicographicOrder
    TableSort(TABLE_Name, "+COL_Name")

Characters taken into account for the punctuation and the spaces

The characters taken into account for the punctuation and the spaces are supplied by the system. To get the list of these characters, write the following WLanguage code:
s is string
FOR i = 0 TO 255
IF Charact(i) <> StringFormat(Charact(i), ccIgnorePunctuationAndSpace) THEN
 s += Charact(i)
END
END
Info(s)
ToClipboard(s)
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment