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.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   11.6    Statistic    FMM    Blog  

Plugin.SetFunctions

Sets the function list the plugin has.

Component Version macOS Windows Linux Server iOS SDK
Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Plugin.SetFunctions"; FunctionList )   More

(old name: SetFunctions)

Parameters

Parameter Description Example
FunctionList The new function list. "Version¶Functions"

Result

Returns OK or error.

Description

Sets the function list the plugin has.
By default plugin allows use of 3000 and more functions.
You can use this command to limit what functions are available to your solution. This avoids some calling a function you don't want to have, e.g. not allow Files.Delete call.

For FileMaker hosting of several clients with one server, we highly recommend to limit the available plugin functions via Plugin.SetFunctions function. You also should limit some functions like Files.Delete or System.Shutdown to be only called by certain user accounts and/or script. See Plugin.LimitFunction for this.

Version 11.5 allows wildcards, e.g. CURL.* to include all CURL functions.

Examples

Allow only two functions:

MBS( "Plugin.SetFunctions"; "Version¶Functions" )

A typical MBS Init script for server usage:

If [MBS("IsRegistered") ≠ 1]
    If [MBS("IsServer")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Server"; 123; 123)]
        # limit to the commands you need
        Set Variable [$r; MBS( "Plugin.SetFunctions"; "IsRegisteredCURL.NewCURL.Perform..." )]
        # enable trace for errors
        Set Variable [$r; MBS( "Trace.SetErrorsOnly"; 1 ) ]
        Set Variable [$r; MBS( "Trace"; "/Library/FileMaker Server/Logs/MBS.txt" ) ]
    Else
        # register on client
        Set Variable [$r; Value:MBS("Register"; "test"; "5 seats"; 123; 123)]
    End If
End If

Use wildcards:

MBS( "Plugin.SetFunctions"; "Version¶Functions¶CURL.*¶Plugin.*" )

See also

Release notes

Blog Entries

Created 16th May 2015, last changed 29th October 2021


Plugin.SetErrorScriptTrigger - Plugin.SetPreviewSize

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins

Start Chat