Actr_DeleteEvent |
This function will remove an event from the memory of the plug-in.
Syntax
Actr_DeleteEvent ( switches ; eventID )
Parameters
switches | determines which information is to be deleted |
eventID | (optional) the event to delete |
Switches
switches can be one of this:
-DeleteLastTriggered | delete the event that was last triggered |
-DeleteAllTriggeredEvents | delete all triggered events |
-DeleteAllEvents | delete all events |
-DeleteByID | delete the event specified in the next parameter |
Returned Result
Data type returned
Error code
Result
If successful it returns 0. If unsuccessful it returns an error code starting with $$ and the error code. Returned error codes can be:
0 | no error | |
$$-50 | paramErr | check if your parameters are correct |
$$-41 | memFullErr | not enough memory |
Other errors may be returned.
Originated in
Activator Plug-in 1.2
Compatibility
FileMaker Pro 17 to 2023
Considerations
You can also delete events when you are retrieving data from the event. See the function Actr_GetEventInfo for this.
Example
Set Field [ result ; Actr_DeleteEvent ( "-DeleteAllTriggeredEvents" ; ) ]
This command will remove all triggered events.
Example 2
We assume that in your FileMaker file the following fields are defined:
gErrorCode Global, text
gEventID Global, number
gEventID contains an eventID. Add the following script step to your Trigger script:
Set Field [ gErrorCode ; Actr_DeleteEvent ( "-DeleteByID" ; gEventID ) ]
This will remove the event with the same EventID as in field gEventID from the memory of the plug-in.
Used in example files
RemoteTriggers.fmp12
ScheduleTriggers.fmp12
Related functions
Actr_GetEventInfo |
Actr_ScheduleEvent |
Related script step
Delete Script Trigger |
Related topics
Activator Plug-in online help (overview)