Field Constraints
Definition
A field constraint is a mask that indicates the formalism which is to be respected for entering some information in a field.
- The constraint forces the user to respect the format, in order to standardize the contents of a table for example.
- A blocking error message, specific to each constraint, will be displayed if the data entered does not respect the expected defined format.
EndDefinition
Constraints will be enabled on forms and wizards. They apply to a selection of fields and are based on the regular expressions.
Examples
- Always enter the employee name in uppercase
- Always enter yhe employee number via numbers ==> A constraint is defined on the field on the Employee form:
- Field IDENTIFICATION of the table AM_EMPLOYEE
- Constraint: [0-9]
- Error message: You may only enter numbers (0 to 9)
--> The user completes the employee number with SMITH: The error message will be displayed.
Notes
- The list of field for which constraints can be defined is defined by
: You cannot add fields.
- The control of the field constraints is done when saving the form or the wizard.
- The error message related to the constraint is always a blocking message, disabling the saving of data of the form or the wizard.
Screen description
Menu access : Administration > Parameters > Field Constraints
Name: Label of the field constraint.
Error Message: Displayed message if the user does not respect the constraint and which should help him to correct the data to be entered (e.g.: Only the characters 0 to 9 are authorized).
Table Name: Physical name in the data model of the table to which belongs the field.
Field Name: Physical name in the data model of the field.
Constraint: Data entry format applying to the selected field, build from a regular expression.
Procedure and Wizards
How to set parameters for a field constraint
1. Proceed to the page Administration > Parameters > Field Constraints and click on .
2. Enter the elements of the constraint and click on [ FINISH ].