Triggers are used to encapsulate complex rules directly within a table. They are special LANSA functions which are automatically invokedĀ when a specific type of I/O operation occurs on a table and when a specific set of conditions is met.
A trigger is defined either for a field or a table. A trigger defined for a field is invoked when the field is used as a column in a table, and the specific I/O operation is performed on the table.
For example: Whenever Salary is changed in the Employee table, a trigger function is called to send an email to the HR department containing the employee details, and the before and after salary figures.