Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1    Statistic  


Registers a SQLQuery function.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JavaScript 5.4 Yes No Yes, macOS only No Yes
MBS( "JavaScript.RegisterSQLQueryFunction"; JavaScriptContext; FunctionName )   More


Parameter Description Example value
JavaScriptContext The reference number of the javascript context. $Context
FunctionName The name for the new function. "SQLQuery"


Returns OK or error.


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')
FMQuery('select * from Hello where "Count"=?', 'JavaScript.fmp12', 9, 13, 2)


Register query function:

MBS( "JavaScript.RegisterSQLQueryFunction"; $$Context; "FMQuery" )

See also

Example Databases

Created 7th November 2015, last changed 7th November 2015

JavaScript.RegisterRunScriptFunction   -   JavaScript.Release

Feedback: Report problem or ask question.

MBS Xojo Plugins