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: 10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2    Statistic    FMM    Blog  


Creates a new javascript context.

Component Version macOS Windows Linux Server iOS SDK License
JavaScriptMac 5.4 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes Paid
MBS( "JavaScript.New" { ; JSRef } )   More


Parameter Description Example Flags
JSRef Available in MBS FileMaker Plugin 12.2 or newer.
The desired js reference.
Usually each one gets a number assigned, but you can create a JavaScript environment with a fixed name, so you can anywhere reference it by name.
"JS" Optional


Returns reference number or error.


Creates a new javascript context.

Reference numbers start at 47000.
Works in FileMaker 32-bit and 64-bit.

Supported for iOS with MBS Plugin 7.5.

Check JS Functions for JavaScript engine cross platform.



Set Variable [ $r; Value:MBS("JavaScript.New") ]
If [ MBS("IsError") ]
    Show Custom Dialog [ Title: "Failed to initialize"; Message: $r; Default Button: “OK” ]
    Set Variable [ $$Context; Value:$r ]
    Show Custom Dialog [ Message: "OK"; Default Button: “OK” ]
End If

See also

Release notes

  • Version 12.2

Example Databases

Blog Entries

Created 5th November 2015, last changed 3th May 2022

JavaScript.HasProperty - JavaScript.RegisterEvaluateFunction

Feedback: Report problem or ask question.

Start Chat