ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Order of items
  • Displaying the result in a List Box or Combo Box control
  • HFSQL type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns the list of items in a data file (query or view) recognized by the HFSQL engine. The data files defined by <Source>.Declare, <Source>.DeclareExternal and <Source>.DescribeFile are taken into account.
Example
// Retrieve items of a data file from current analysis
ItemList is string
ItemList = Customer.ListItem(hLstDetail)

// Add the list of items into COMBO_COMBO1
COMBO_COMBO1.Add(ItemList)
// Exécution d'une requête "SELECT *" et interrogation des rubriques
sdListeVILLE is Data Source
sListeRub is string
sContenuEnreg is string
sReq is string = "SELECT * FROM CODEPOSTAUX WHERE CODEPOSTAL ='34000'"

// Exécution de la requête
sdListeVILLE.ExecuteSQLQuery(hQueryDefault, sReq)
// Liste des rubriques de la requête.
sListeRub = sdListeVILLE.ListItem()

// Parcours de la requête
FOR EACH sdListeVILLE 
	sContenuEnreg = ""
	// Pour chaque enregistrement, il faut parcourir les rubriques
	FOR EACH STRING sUneRubrique OF sListeRub SEPARATED BY CR
		sContenuEnreg += {"sdListeVILLE." + sUneRubrique, indItem}
	END
	Info("Contenu de l'enregistrement : " + sContenuEnreg)
END
Syntax

Listing the data file items Hide the details

<Result> = <Source>.ListItem([<Path of the WDD file> [, <Password of the WDD file> [, <Options>]]])
<Result>: Character string
List of items found in the specified data file. The descriptions of each item are separated by CR characters (Carriage Return). The result is more or less detailed depending on the constant used:
hLstDetail is not specified<Name of item 1> + CR + <Name of item 2> + CR + ...
hLstDetail is specified<Name of item 1> + TAB + <Type> + TAB + <HFSQL type> + TAB + <Size> + TAB + <Number of indexes> + TAB + <Caption> + CR + ...
hLstDetailPlus<Name of item 1> + TAB + <Type> + TAB + <HFSQL type> + TAB + <Size> + TAB + <Number of indexes> + TAB + <Caption> + TAB + <Integer part of numeric items> + TAB + <Decimal part of numeric items> + CR + ...
Where:
  • <Nom de rubrique X> Item name
  • <Type> Field type: "T" for text (and currency) or "N" for numeric
  • <Type HFSQL> HFSQL type of the field. For more details, see Remarks.
  • <Taille>: Section size
  • <Number of indices>: Number of elements in the array
  • <Libellé>: Name of heading.
  • <Partie entière des rubriques numériques> Number of digits in the integer part of numeric fields
  • <Partie décimale des rubriques numériques> Number of digits in the decimal part of numeric fields
Java In Java, <Caption> corresponds to the name of item.
<Source>: Type corresponding to the specified source
Name of the data file (query or view) whose items will be listed.
If a query name is specified, the query must be running (<Source>.ExecuteQuery or <Source>.ExecuteSQLQuery) to use <Source>.ListItem. Otherwise, a WLanguage error occurs.
<Path of the WDD file>: Optional character string
Full path of analysis (.WDD file) where the data file is described. If this parameter is not specified or is an empty string (""), the data file is searched for in the current analysis.
Java This parameter is ignored. The data file is sought in the current analysis.
<Password of the WDD file>: : Optional character string
Password defined for the analysis. If no password is defined, this parameter must be an empty string ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.

New in version 2025
AndroidAndroid Widget Secret strings are not available for this parameter in Android/Android widget applications.

Java This parameter is ignored.
<Options>: Optional Integer constant (or combination of constants)
Type of list to perform:
hLstAllLists all the type of items (hLstItem + hLstMemo + hLstKey + hLstCompositeKey)
Hyper File 5.5 This constant is ignored.
hLstCompositeKeyLists the composite key items only
Hyper File 5.5 This constant is ignored.
hLstDetailDetailed information (idem earlier versions).
hLstDetailPlusFor the numeric items, adds the number of digits in the integer part and in the decimal part.
Hyper File 5.5 This constant is ignored.
hLstItemLists the non-key and non-memo items
hLstKeyLists the key items (non-composite keys only)
Hyper File 5.5 This constant is ignored.
hLstLogicalOrderSorts the list in logical order of items (ignored if hLstSorted is specified)
Hyper File 5.5 This constant is ignored.
hLstMemoLists the memo items
Hyper File 5.5 This constant is ignored.
hLstNormal
(default value)
Corresponds to hLstItem + hLstMemo + hLstKey
hLstOriginalItemUsed on a log file (xxxJNL.fic), lists the items of the source file (that was logged). For example, on CustomerLOG.Fic, lists the items of CUSTOMER file.
Hyper File 5.5 This constant is ignored.

Java This constant is not available.
hLstSortedSorts the list in alphabetical order
Hyper File 5.5 This constant is ignored.
Remarks

Order of items

The items listed in <Result> are sorted according to the physical order of items in the data file (except if the hLstSorted constant is used).

Displaying the result in a List Box or Combo Box control

<Result> can be directly assigned to a List Box or Combo Box control by <List Box>.Add. Each row will contain the description of an item.

HFSQL type

The possible HFSQL types are as follows:
0unknown type18-byte automatic identifier
2text item3signed integer item on 2 bytes
4signed integer item on 1 byte5signed integer item on 4 bytes
6simple real item (on 4 bytes)7simple real item (on 8 bytes)
8record number item (unsigned integer)9unsigned integer item on 2 bytes
10date item on 611time item
12unsigned integer item on 1 byte13turbo real item
14date item on 815text memo item
16binary memo 4.0 item17currency item
18binary memo, image memo item,
Sound memo, OLE memo or other binary memo
19signed integer item on 8 bytes
20unsigned integer item on 8 bytes21image item
22unsigned integer item on 4 bytes23character string item
24date+time item25duration item
26character item27boolean item
28automatic identifier item (on 4 bytes)29Unicode text item
30Unicode text memo item31high-precision numeric item
32Enumeration item33Combination item
34128-bit UUID item35128-bit automatic UUID item
36256-bit UUID item37256-bit automatic UUID item
38JSON item39Secure Password item
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help