Persistent Triggers

213,102pages on
this wiki
Add New Page
Add New Page Discuss this page0

Creating Persistent Triggers

The syntax is:

Trigger trigger(Name, Scope, Type, Event, Priority, DXL)


is a string to identify the trigger
is specified by a chain of Level and Level-modifier tokens, linked by "->"
is project, module, object or attribute
is all, formal, link, descriptive, user or a string which specifies an item by name (or the Absolute Number in the case of objects).
For example:
 project -> "My Project" -> module -> "My Module" -> object -> "35" -> attribute -> "My Attribute"
Truncate the chain according to the desired level (e.g. for a Module-level Trigger, omit the object and attribute tokens).
Luckily, chains like this can be simplified: If you omit the Level-modifier token at the Project or Module level, the current Project or Module is assumed. Further, if the current Project or Module is what you want, you can omit the Level token too, so the above becomes:
 object -> "35" -> attribute -> "My Attribute"
If you omit the Level-modifier token at Object-level, "all" is assumed. Similarly, if you omit the object-level token as well then "all" is assumed, so in this case the above becomes simply:
 attribute -> "My Attribute"
A Trigger with this Scope would be atached to the "My Attribute" Attribute for all Objects in the current Module.
Note: If you have a trigger that is attached to all objects, and you want it to operate on the particular Object that caused the Trigger to fire, you can obtain a handle on that object using:
 Object obj = object(current Trigger)
pre or post
open, close, sync or modify. The permissible events depend on the Scope as follows:
Scope Event
module open
module close
object open (starting an in-line edit by double-clicking in a column)
object sync (making a different Object current)
attribute modify

Also on Fandom

Random wikia