This function is used to handle triggers for Enterprise files. When an add/update or delete event occurs the general trigger program ASTR200 is used.
If a program is activated for the specific file, the activated program is called via ASTR200. The program then determines on field level if the information is changed, or if the record is deleted or added. If a change is “recorded” different kinds of processes might occur, e.g., call to other Enterprise programs or storage of data in other database files.
It is possible to have several trigger programs active for the same file. This enables the possibility to trigger changes on a file where different kinds of information has been changed.
For standard DC1 all records in this table are created via pre-load programs. In general, it is described in the applicable installation document which pre-load program should be run and also which files and programs that should be activated.
For customer installations it is possible to add new files and programs to this table. If new files are added to an already existing program, the program must be modified to also include the added file.
Options
Remove trigger | Select this option to delete triggers for this file. |
Create trigger | Select this option to create triggers for this file. |
Selection fields
- File
- This column displays the file name.
- Description
- This column displays the description of the file.
- Program
- This column displays the program name.
- Active
- This column denotes if a trigger for the file has been activated.
- Trigger created
- This column denotes if a trigger has been created for the file.
- App
- This column displays the application to which the file and program belongs.
Work with application database triggers (ASTD21004)
On this panel you enter the parameters and details of the application database triggers.
- File
- Enter the file name for which the trigger should executed.
- Program
- Enter the program for which the trigger should be executed.
- Trigger insert
- Set this flag to YES if the file should be handled for new records.
- Trigger update
- Set this flag to YES if the file should be handled for changed records.
- Trigger delete
- Set this flag to YES if the file should be handled for deleted records.
- Trigger time
- This field is pre-loaded with the panel value for After (i.e. 2). This denotes that the processing will continue after the database is updated with the added, changed or deleted record.
- Application
- Enter the application code from Work with application definitions denoting the application for which the database trigger belongs.
- Active
- Enter the code for YES or NO to indicate if the unique trigger program is active or not. Note: Trigger program can be activated/inactivated regardless if triggers have been created (i.e. the Trigger create option was run).
Work with application database triggers, Copy (ASTD21005)
- File
- Displays the file(s) for the application database trigger you selected to copy.
- Program
- Displays the program(s) for the application database trigger you selected to copy.
- New file
- Enter the new file for the application database trigger you are creating.
- New pgm
- Enter the new program for the application database trigger you are creating.
Work with application database triggers, Deletion (ASTD21008)
Work with application database triggers, Remove trigger (ASTD21011)
This panel displays the file(s) and program(s) for which the trigger should be removed. Click OK to remove the trigger.
Work with application database triggers, Create trigger (ASTD21014)
This panel displays the file(s) and program(s) for which the trigger should be created. Click OK to create the trigger.