Try OpenEdge Now
skip to main content
Basic Database Tools
Trigger Tasks : Creating a trigger from an existing field
 

Creating a trigger from an existing field

To create a field trigger from an existing field:
1. Choose Schema Field Editor. The Field Editor alphabetically lists all the tables defined for your database.
2. Select the table that contains the field for which you want to create the trigger. The Field Editor window appears.
3. Choose Triggers.
4. Select the field for which you want to define the trigger. The Field Triggers dialog box appears:
5. Specify the name of the trigger procedure, then press PUT to enter the trigger code. The Trigger Editor appears.
6. Specify whether a session trigger can override the schema trigger. For more information about session and schema triggers, see the chapter on database triggers in OpenEdge Getting Started: ABL Essentials.
7. Specify whether the database engine verifies the cyclical redundancy check (CRC) code.
8. Choose OK to create the trigger and return to the Field Editor.
Note: To generate r-code for schema trigger definitions, you must define the trigger procedure in the Data Dictionary, then compile and save the r-code with the Application Compiler.