PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Array items
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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
iPhone/iPad This function is now available for 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 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 iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 26 and later
Android This function is now available for Android applications..
Android Widget This function is now available in Android widget mode.
New in version 26
Android This function is now available for Android applications..
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications..
Android Widget This function is now available in Android widget mode.
Example
// Export current record of the last data file used
sJSON is string = HRecordToJSON()
// Export current record of "Customer"
sJSON is string
sJSON = HRecordToJSON(Customer)
// Export current record of "Customer"
// Remark: only the NAME and NUMBER items are taken into account
sJSON is string
sJSON = HRecordToJSON(Customer, "NAME,NUMBER")
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 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: Composite key, binary memo or binary items are ignored.
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment