This function will remove an event from the memory of the plug-in.
Actr_DeleteEvent ( switches ; eventID )
|switches||determines which information is to be deleted|
|eventID||(optional) the event to delete|
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|
Data type returned
If successful it returns 0. 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.
Activator Plug-in 1.2
FileMaker Pro 15 to 19
You can also delete events when you are retrieving data from the event. See the function Actr_GetEventInfo for this.
Set Field [ result ; Actr_DeleteEvent ( "-DeleteAllTriggeredEvents" ; ) ]
This command will remove all triggered events.
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.
Related script step
|Delete Script Trigger|