2.6.1 Rule and Trigger Levels and Hierarchy
Rules and triggers exist in a 3 level hierarchy:
DICTIONARY LEVEL
|
|
|
FILE LEVEL
|
|
|
PROCESS LEVEL
- Dictionary level rules/triggers always apply to a field under all circumstances. For instance, a dictionary level rule that says a post code must be in the range 2000 to 2999 will ensure that no matter when or how the post code field is used it will ALWAYS have to be in the range 2000 to 2999.
- File level rules/triggers apply only to the field within the file. For instance, FILE1 may have a rule that says field DATDUE must be in the format DDMMYY, however FILE2 may have a check that says field DATDUE must be in the format YYMMDD. This may be perfectly valid.
- Process level rules apply only to the field as used within a process. For instance, process ORDERS may add the rule that field DATDUE (used in preceding example) must be within the next 30 days. This check will be done in addition to the file level checks associated with file FILE1.
When working with a field at any level of the hierarchy you CANNOT VIOLATE a rule or trigger that exists at a higher level in the hierarchy.
The level in the hierarchy you are working at is easy to remember:
- If you are working from the field control menu then you are working at the DICTIONARY level.
- If you are working from the file definition menu (i.e. working with a file definition) then you are working at the FILE level.
- If you are working from the process definition menu (i.e. working with a process or function definition) then you are working at the PROCESS level.