fm.run (filename, scriptname {, parameter} )

Parameters:
   filename: file name of .fmp12 file
   scriptname: name of the script to execute
   parameter: text passed to FileMaker script (optional)

Result:
   text result returned by FileMaker script

Error:
   Python exception, error number, or "?"

Script Step:
   N/A

––––––––––

First appeared in: 0.80

Examples in demo file: 0

Compatibility:   Client, macOS, Server, Ubuntu, WebDirect, WPE

––––––––––

Queue a FileMaker script to be called.

You can use this Python method from a Python script to trigger the named script. The named FileMaker script will not execute until the current FileMaker script has completed.

If the FileMaker file has more than one script with the same name it is unknown which script will be used. You may omit ".fmp12" from the file name.

the fm.run function will return to Python a result of 104 if the script name is unknown, and 100 if the file name is unknown or not open.

Since the FileMaker script never complete before the Python script, the currently executing Python script will never be able to get results from the FileMaker script.