Running Variable Name Scripts on Filemaker Server

We are trying to trigger a variable named script on Filemaker server.

We thought that maybe this command would work...

Set Variable [ $js ; Value: MBS( "JS.New" ) ]
Set Variable [ $r ; Value: MBS( "JS.AddFileMakerRunScriptFunction"; $js; "FMRun") ]
Show Custom Dialog [ "Result" ; MBS( "JS.Evaluate"; $JS; " "start script: " + FMRun("JavaScript.fmp12", "testRun", "Hello World")" ) ]
Set Variable [ $r ; Value: MBS( "JS.Release"; $JS ) ]

However, Result = 100 (It runs just fine on the client @ Result = 0)

Do you have any suggestion on how one would trigger a variable name script on FM Server?

Sorry, but FileMaker doesn't allow plugins to trigger scripts server side.

You need to use Perform Script by Name.

1 Like