2.6 Field Rules/Triggers
The types of rules that can be worked with are:
- A range of values rule: allows a field to be checked against various ranges of values. For instance, an Australian post code should be in one of the ranges 2000 to 2999, 3000 to 3999, etc.
- A list of values rule: allows a field to be checked against a list of values. For instance, an Australian state should be in the list QLD, NSW, VIC, etc.
- A code/table/file lookup rule: allows a field to be "looked up" in a code file or table. For instance, a product number may be looked up in the product master file to check that it is a valid number.
- A simple logic rule: allows simple conditions to be evaluated to check a field. For instance, "item weight must be less than (item volume * 10.643)" may be a check used in an order entry system.
- A complex logic rule: allows complex validation checking to be performed by your own LANSA functions or 3GL application programs. For instance, the validation of a "due date" may be done via a function or program that can account for public holidays, weekends, etc.
- A date format/range rule: allows a field to be validated as a date in a certain format (DDMMYY,MMDDYY,etc) and in a certain range. For instance, a "date order due" may have to be in format DDMMYY and no more than 90 days into the future.
- Trigger: allows a function to be linked to a field at either dictionary or file level which will be "triggered" under the conditions specified in the field trigger itself.