SQLasJSON ( tablename ; fields ; condition )
Performs SQL query on designated table and returns response from declared fields wrapped as JSON.
Be the first to rate this function Log in to vote
Jonni™ - Show more from this author |
"data" :
{
"columns" : 3,
"rows" : 2
},
"response" :
[
{
"fieldName1" : "value1",
"fieldName2" : "value2",
"fieldName3" : "value3"
},
{
"fieldName1" : "value1",
"fieldName2" : "value2",
"fieldName3" : "value3"
}
]
}
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function performs an ExecuteSQL query to the designated table to retrieve values of declared field names. If the condition is passed blank or partial table if SQL conditions are passed in the conditions parameter.
The results is then wrapped into a JSON array where each row is defined as one object consisting of entities where key is defined as the declared field name populated but the returned value.
Additionally row count and field count are returned within the data object.
Requires FileMaker 18 or higher
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.