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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
JavaScript.CallFunction
Calls a global function given the name with FileMaker values.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
JavaScriptWebKit
|
12.2 |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
MBS( "JavaScript.CallFunction"; JavaScriptContext; Name; Parameters... )
More
MBS(
"JavaScript.CallFunction"; /* Calls a global function given the name with FileMaker values. */
$JavaScriptContext; /* The reference number of the javascript context.e.g. $Context */
$Name; /* The name of the function.e.g. "test" */
$Parameters...) /* Value to pass as parameter. */
Less
Parameters
Parameter |
Description |
Example |
JavaScriptContext |
The reference number of the javascript context. |
$Context |
Name |
The name of the function. |
"test" |
Parameters... |
Value to pass as parameter. |
|
Result
Returns value or error.
Description
Calls a global function given the name with FileMaker values.
Parameters are passed to the function. Please pass as many parameters in FileMaker as needed.
Numbers are passed as number and other values are passed as text.
If the function needs more parameter, undefined values are used to fill up.
If the function needs less parameters, additional ones are dropped.
Returns the result of the function converted to FileMaker, e.g. as text or number value.
If you like to use JSON instead, please put in properties or pass JSON as string and let JavaScript decode it as part of the function.
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Parameters parameter as often as you need.
Examples
Call a Test function and pass two numbers:
Show Custom Dialog [ MBS( "JavaScript.CallFunction"; $$Context; "Test"; 5.3; 3 ) ]
See also
Release notes
Example Databases
Blog Entries
This function checks for a license.
Created 3th May 2022, last changed 9th February 2023
JavaScript.CF
-
JavaScript.CheckScriptSyntax