Controls the triggering of the plug-in. You can disable and enable local triggering of the plug-in. This allows you to change the contents of a field which is validated by triggering a script.
Actr_Control ( switches ; password )
|switches||these determine how the function works. You can disable or enable all functions|
|password||the password to be used|
switches can be one of the following:
|-DisableLocalTriggers||disable triggering of scripts on this computer and also the scheduling of new triggers|
|-EnableLocalTriggers||enable triggering of scripts on this computer and also the scheduling of new triggers|
|-GetLocalTriggerStatus||get the status of the local triggering: 1 is on, 0 is off|
Data type returned
The returned result is an error code. An error always starts with 2 dollars, followed by the error code. You should always check for errors. Returned error codes can be:
|$$-4217||pwdAlreadySet||password already set (enable first)|
|$$-4218||alreadyEnabled||functions are already enabled|
|$$-4219||pwdWrong||given password was wrong|
Other errors may be returned.
Activator Plug-in 1.2
FileMaker Pro 16 to 19
When you call Actr_ScheduleEvent when triggering is disabled an error code of $$-4220 is returned.
When you disable triggering, the scheduling of new local trigger events is also disabled until restart of FileMaker. Other users can still trigger scripts on their computer and you can also send a remote event to another computer.
Set Field [ result ; Actr_Control ( "-DisableLocalTriggers" ; "secret password" ) ]
This will disable the trigger functions of the plug-in on this computer.
We assume that in your FileMaker file the following fields are defined:
gErrorCode Global, number gPassword Global, text
gPassword should contain a password, for example “rapunsel”. Add the following steps to a script:
Set Field [ gErrorCode ; Actr_Control ( "-DisableLocalTriggers" ; gPassword ) ] #... do for example a Replace function on a script validated function... Replace Contents [ ValidateField ; newValue ] Set Field [ gErrorCode ; Actr_Control ( "-EnableLocalTriggers" ; gPassword ) ]
This will first disable the plug-in’s triggers. Then you can change the values. The last step reactivates triggering.
Used in example file