Skip to main content

Actr_RunScript (function reference)

By January 1, 2024January 25th, 2024Online Help, Troi Activator Plug-in
Activator Plug-in for FileMaker Pro


This function will allow a script to be run from a calculation.

SyntaxFunction badge

Actr_RunScript ( switches ; fileName ; scriptName ; scriptParam )


switches not used, reserved for future use. Leave blank or put "-unused"
fileName the name of the file that contains the script
scriptName the name of the script
scriptParam (optional) a free to use text that will be the incoming script parameter

Returned Result

Data type returned



If successful an eventID is returned: this is an internal eventID that the plug-in assigns, for example 4242.

If unsuccessful it returns an error code starting with $$ and the error code. Returned error codes can be:

$$-50 paramErr check if your parameters are correct
$$-41 memFullErr not enough memory

Other errors may be returned.

Originated in

Activator Plug-in 2.6


FileMaker Pro 17 to 2023


NOTE: the plug-in does not store the information of this function, so you don’t need to delete anything after the script has triggered.

See the Tooltips.fmp12 example for hints how to implement this.
See Actr_ScheduleEvent if you want to schedule a script trigger in the future.


Set Field [ result ; Actr_RunScript ( "-unused" ; "Tooltips.fmp12" ; "RunScript1" ; "hello" ) ]

This command triggers the script “RunScript1” in file “Tooltips.fmp12”. Note that this example is somewhat simplified, normally you should not use hardcoded filenames like in the above example. See also example 2, for a more robust example.

Example 2

We assume that in your FileMaker file the following fields are defined:

gEventID		Global, number

Add the following script step:

Set Field [ gEventID ; Actr_RunScript ( "-unused" ; Get ( FileName ) ; "RunScript1" ; 
				"Check record please." ) ]

This command will directly trigger the script “RunScript1” in the current file.

Used in example file


Related functionsFunction badge


Related topics

Activator Plug-in online help (overview)

Online Help Page for Activator Plug-in for 17 to 2023 –> Actr_RunScript (actrp4620) 2024-0125 14:48:29