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
  • Array items
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Retrieves the structure and value of the current record and exports them into a string in JASON format.
Remark: This function can be used on both data files and queries.
Example
// Exporte l'enregistrement en cours du dernier fichier de données utilisé
sJSON is string = HRecordToJSON()
// Exporte l'enregistrement en cours du fichier de données "Client"
sJSON is string 
sJSON = HRecordToJSON(Client)
// Exporte l'enregistrement en cours du fichier de données "Client"
// Remarque : seules les rubriques NOM et NUMERO sont prises en compte
sJSON is string 
sJSON = HRecordToJSON(Client, "NOM,NUMERO")
Syntax
<Result> = HRecordToJSON([<Data file> [, <List of items>]])
<Result>: Character string
Structure and value of the current record in JSON format. This structure has the following format:
{"File":
{
"Item1":Data of item 1,
"Item2":Data of item 2,
...
}
}
<Data file>: Optional character string
Name of the HFSQL data file or query used. If this parameter is not specified, the last HFSQL data file used will be taken into account.
<List of items>: Optional character string
Items to export.
If several items are specified, the name of the items must be separated by a comma.
Composite key, binary memo or binary items are ignored.
If this parameter is not specified or is an empty string (""), all fields are exported (except compound key, binary memo or binary fields) in the physical order of description.
Remarks

Array items

If one of the exported items is an array item, each element of the array item is exported in a new level:
{"File":
{
"Item1":Data of item 1,
"Item2":Data of item 2,
"ArrItem":
[Data element 1, Data element 2, ...]
...
}
}

Reminder Compound key, binary memo and binary fields are ignored.
Business / UI classification: Business Logic
Component: wd300hf.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/14/2025

Send a report | Local help