Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
JavaScript.RegisterSQLQueryFunction
Registers a SQLQuery function.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| JavaScriptMac | 5.4 | Yes | No | No | Yes, macOS only | Yes |
MBS( "JavaScript.RegisterSQLQueryFunction"; JavaScriptContext; FunctionName ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| JavaScriptContext | The reference number of the javascript context. | $Context |
| FunctionName | The name for the new function. | "SQLQuery" |
Result
Returns OK or error.
Description
Registers a SQLQuery function.The javascript function has as parameter first the SQL expression. Second optional parameter is the file name to limit query to only this FileMaker database file. Third and forth parameter are separators for column or row which can be text or number. Default is column = tab and row = return. Fifth and following parameters are passed as parameters to SQL.
Call like this:
FMQuery('select * from Hello')
or
FMQuery('select * from Hello where "Count"=?', 'JavaScript.fmp12', 9, 13, 2)
Examples
Register query function:
MBS( "JavaScript.RegisterSQLQueryFunction"; $$Context; "FMQuery" )
See also
- JavaScript.RegisterEvaluateFunction
- JavaScript.RegisterFunction
- JavaScript.RegisterRunScriptFunction
Example Databases
Created 7th November 2015, last changed 9th January 2020
JavaScript.RegisterRunScriptFunction - JavaScript.Release
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins