Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Mandatory. Enter the name of the trigger function which will be called when the trigger conditions are satisfied. The named function must be defined with the TRIGGER parameter on the FUNCTION command. (Refer to the FUNCTION command in the Technical Reference Guide for details).

...

  • Operations allowed are:

    GT 

    Greater than

    GE 

    Greater than or equal to

    LT 

    Less than

    LE 

    Less than or equal to

    EQ 

    Equal to

    NE 

    Not equal to

    REF

    Refers to

  • All operation codes can be suffixed by a "P" indicating that the previous value of the nominated field should be used. Such conditions are only valid for "Update" operations. Also, Part 2 of the condition must not be a literal if this type of operation code is used.
  • No conditions are allowed if "Open" or "Close" are used.
  • The "REF" operation code is only valid for "Insert", "Update" and "Read" operations.
  • If the trigger is defined at dictionary level, the conditions can only involve the field to which the trigger is being linked.
  • If the trigger is defined at the file level, the conditions can involve any other real or virtual fields in the file to which the trigger is being linked.

...

Name

Function

Trigger Before

Points After

Comments

TRGFN1

Open



Call trigger function TRGFN1 following an insert or update of field SALARY, or before a delete of field SALARY. Note that no conditions have been applied to this trigger.


Close





Read





Insert


Y



Update


Y



Delete

Y



Refer to Trigger Functions for full details and examples.