Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.InsertRecords
Inserts multiple records in a table in one line using JSON.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 14.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.InsertRecords"; FileName; TableName; JSON ) More
Parameters
Parameter | Description | Example |
---|---|---|
FileName | The file name of where the table is inside. Can be empty to look for the table in all files. Using a table in another database file may require you adding the other file as an external data source and adding the external table to your relationship graph to grant access. |
Get(FileName) |
TableName | The name of the table to insert record into. Can be ID of table, so we lookup name by ID. Can be result of GetFieldName() function as we remove field name automatically. |
"Assets" |
JSON | The JSON arrays with the records. |
Result
Returns OK or error.
Description
Inserts multiple records in a table in one line using JSON.Like JSON.InsertRecord, but takes a JSON array.
Examples
Add two records in one call:
MBS("JSON.InsertRecords"; ""; "Contacts"; "[{\"FirstName\": \"John\", \"TheNumber\": 123}, {\"FirstName\": \"Thom\", \"TheNumber\": 234}]")
See also
This function checks for a license.
Created 19th September 2024, last changed 19th September 2024