PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • 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
HRecordToJSON (Function)
In French: HEnregistrementVersJSON
Retrieves the structure and value of the current record and exports them into a string in JASON format.
Note: This function can be used on the data files and on the queries.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Exports the current record found in the last file used
sJSON is string = HRecordToJSON()
// Exports the current record of "Customer" file
sJSON is string
sJSON = HRecordToJSON(Customer)
// Exports the current record of "Customer" file
// Note: only the NAME and NUMBER items are taken into account
sJSON is string
sJSON = HRecordToJSON(Customer, "NAME,NUMBER")
Syntax
<Result> = HRecordToJSON([<File Name> [, <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,
...
}
}
<File Name>: Optional character string (with or without quotes)
Logical name of the HFSQL data file used or logical name of the 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)
Name of the items to export.
If several items are specified, the name of the items must be separated by a comma.
The Composite Key items, Binary Memo items or Binary items are ignored.
If this parameter is not specified or if it corresponds to an empty string (""), all the items are exported (except Composite Key items, Binary Memo items and Binary items) 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: The Composite Key items, Binary Memo items or Binary items are ignored.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment