Where do I implement script triggering when a user leaves a field?
You need to add a custom validation to the field you want to have a trigger. In Manage, Database, Fields tab select the field to add the trigger to. Then click on the option button and select the “Validation” tab. Select the “Validated by Calculation” checkbox and specify the calculation.
The calculation will be similar to this:
Actr_ScheduleEvent ( "-addSingleEvent" ;
Timestamp ( Get ( CurrentDate ) ; Get ( CurrentTime ) ) ; Get ( FileName ) ; "myScript" ; Rec ID ; "dontcare" )
Here “myScript” is the name of the script to trigger and RecID is an identifier of the record. Add the script “myScript” and add this step to get information out and remove the event:
Set Field [ gRecID ; Actr_GetEventInfo ( "-LastTriggered -GetYourID -DeleteThisEvent" ; ) ]
See the Validation.fmp12 example in the download for more information on this.
Will the Activator Plug-in track validation events within Filemaker, making it more slow?
No. The Activator Plug-in only becomes active when it gets called by FileMaker when a field is exited. So there is almost no extra overhead.
Can I have several scripts in one file that trigger for field-changes or do they have to be in the same script?
You can have more scripts. This makes it much clearer.
Can I have a script within the same file that checks for future-events (i.e. reminder/calendar-functions) and another one for checking/validating fields?
Yes, this is possible.
Can I send remote events with Activator on Citrix?
Using Troi Activator Plug-in on Citrix and remote events has a limitation: only one listener can open the same portnumber on the Citrix server. So you need to use different portnumbers for each individual listening client, then it should be working fine.
You can administrate the opened port numbers in a shared database, similar as the Remote.fmp12 example in the download. When a client starts listening store the portnumber as well. A sender can then find a client and its portnumber from this.
What happens if FileMaker Pro is not running when a scheduled event is due to be triggered?
Nothing happens at that moment. FileMaker needs to be running and the database with the script to trigger must be open to be able to trigger the event.
If you want an event that was due to be triggered when FileMaker was not running also to trigger after FileMaker Pro is opened you can add the switch “-TriggerPastEventAfterRestart” to the Actr_ScheduleEvent function.
Set Field [ result ;
Actr_ScheduleEvent ( "-addSingleEvent -triggerPastEventAfterRestart" ;
Timestamp ( Schedule::date ; Schedule::time ) ; Get ( FileName ) ; "Trigger Script 1" ; "Your RecID" ; "" ) ) ]
But beware: this might result in all the ‘old’ scripts being triggered at almost the same time. It might be better to use a startup script to check with the help of data you stored in the database if any scripts need to be executed.
On OS X 10.9 (Mavericks) Troi Activator Plug-in does not seem to load, or error code 1550 appears when installing. Do you have a solution?
On Mac OS X 10.9 (Mavericks) earlier versions of Troi Activator Plug-in do not load properly. When you use EasyInstallTroiPlugins.fmp12 this error dialog appears: “An error occurred while installing Troi Activator Plug-in (error code 1550)”. Error code 1550 means: “Cannot load the plug-in or the plug-in is not a valid plug-in.” We fixed this problem in version 3.5.1. Please update to that version or later of Troi Activator Plug-in.
If your question is not answered here, please look in the documentation that comes with the plug-in. If you have suggestions please email a FAQ suggestion.