PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Array items
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
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 the data files and on the queries. Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
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:
{"Fichier":
{
"Rubrique1":Donnée de la rubrique 1,
"Rubrique2":Donnée de la rubrique 2,
...
}
}
<Data file>: Optional character string (with or without quotes)
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 (with quotes)
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:
{"Fichier":
{
"Rubrique1":Donnée de la rubrique 1,
"Rubrique2":Donnée de la rubrique 2,
"RubriqueTab":
[Donnée élément 1, Donnée élément 2, ...]
...
}
}

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