Schedule Script Trigger (script step reference)

Activator Plug-in > Script steps reference > Schedule Script Trigger
Activator Plug-in for FileMaker Pro

Schedule Script Trigger

This function will schedule a script to be automatically triggered in the future.

SyntaxScript step badge

Schedule Script Trigger [ Select ; Result ; Datetimestamp ; File name ;
Script name ; Your ID ; User text ]


Select entire contentsreplaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field
Resultthe eventID for the script trigger or an error code
Datetimestampthe timestamp indicating the date and time the script must be triggered
File namethe name of the file that contains the script
Script namethe name of the script
Your ID(optional) a free to use ID that you can supply to identify the trigger event
User text(optional) a free to use text that you can supply for your own needs

Returned Result

Data type returned



If successful an eventID is returned: this is an internal eventID for the script trigger 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:

$$-50parameter errorcheck if your parameters are correct
$$-41not enough memory
$$-4216OLE error (windows)
$$-4223maximum number of events scheduled (1000)
$$-4226you can’t schedule an event in the past

Other errors may be returned.

Originated in

Activator Plug-in 4.5


FileMaker Pro 16


The date parameter should be in the same format as a FileMaker date field.
The time parameter should be in the same format as a FileMaker time field.

IMPORTANT: Don’t forget to delete triggered events in the triggered scripts, as this might fill up the memory. See Delete Script Trigger.


Schedule Script Trigger [ Select ; Result ;  
				Timestamp ( "12/16/2017" ; "12:22:45 PM" ) ;
				"Events.fmp12" ; "TriggerScript1" ; "12345" ; "hi!" ]

This command will trigger the script “TriggerScript1” in file “Events.fmp12” on day December 16th, 2017, at 12:22:45 PM. Note that this example is somewhat simplified, normally you should not use hardcoded dates like in the above example, as this will only work on a system with US dates. See also example 2, for a more robust example.

Example 2

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

gTriggerDate		Global, date
gTriggerTime		Global, time
gEventID		Global, text

gTriggerDate and gTriggerTime can be filled with the date and time the script should be triggered. Add the following script step:

Schedule Script Trigger [ Select ; gEventID ; 
				Timestamp ( gTriggerDate ; gTriggerTime ) ; Get ( CurrentFileName ) ; 
				"TriggerScript" ; Get ( CurrentRecordID ) ; "Check record please." ]

This command will trigger the script “TriggerScript” in the current file. It will be triggered on the day and time that are in the global fields gTriggerDate and gTriggerTime.

Related script stepScript step badge

Delete Script Trigger

Related functionsFunction badge


Related topics

Activator Plug-in online help (overview)

Online Help Page for Activator Plug-in for 12 to 16 –> Schedule Script Trigger (actrp7614) 2017-0831 12:58:53