See Dictionary Triggers for an overview of this powerful feature.
This dialog allows you to enter a trigger for the selected dictionary table. The following prompts are provided:
General
Type
Select the trigger type to designate when the trigger will be executed during one of the following database actions:
(Programmer's Note: Each trigger type corresponds to a related ABC FileManager method)
Type | ABC Method Called |
Before Insert | PreInsert |
After Insert | PostInsert |
Before Update | PreUpdate |
After Update | PostUpdate |
Before Delete | PreDelete |
After Delete | PostDelete |
Text
Enter the trigger statement in the list box provided by pressing the ellipsis button to enter a full screen editor format.
Make sure to press the OK button to save your dictionary trigger after returning from the Data or Text areas, before attempting to add an additional one.
Columns
Press the Insert button to add variables that will be used in your trigger. These data elements will automatically be included in applications that reference the active table. The data elements defined here are only valid for the selected trigger type.
These data items are defined as local data elements of the trigger procedure type (listed above) for the target table. You can only refer to these data elements from within the trigger source text defined, or in the corresponding embed point generated in the Global section of the target application.
Comments
Allows you to enter a text description describing the trigger. The description is solely for your convenience, and has no effect on the application. It is useful for situations in which other programmers may pick up your code later, or for when you expect to return to the project after a long period of time since you last looked at it.
This tab also contains read-only information about the selected dictionary element. It includes the date that it was created and llast modified, version number, and user rights to the target element.
Trigger Tokens
To enable the support for Dictionary Triggers in the Clarion Template Family. In the Global Properties dialog on the File Control tab, check the Enable Triggers Support check box.
Also, there is a new token support to control triggers that are specific for both ABC or Clarion chains:
To add code to both chains there are some tokens that can be added.
—TARGET ChainName
—ENDTARGET
where ChainName can be ABC or CLARION
Any code outside the tokens will be added to both chains.
For example:
!Code for ABC & Clarion
—TARGET ABC
!Code only for ABC
—ENDTARGET
!Code for ABC & Clarion
—TARGET Clarion
!Code only for Clarion
—ENDTARGET
!Code for ABC & Clarion