The first line shows where the constraints of the field are taken from. When fields are added to the structure of a page (see the Page Structure page), an option exists to link the constraints of the element to a schema element. If this is done, on the Data Constraints section, the message line will show that the constraints of the field are driven by the used data structure file. If this field is edited by the user in any way, or if fields are not added from a data structure file, it will reflect this as well. However, if a schema link does exist, users can revert back to the schema constraints by clicking on the Revert to Schema Constraints button.
The Data Type specifies the type of data values that should be used for this field: String, number, boolean or date. The Mandatory checkbox indicates whether a value is required for this field or whether the user can leave it empty. A tick in the checkbox means they must provide a value.
The Enumerations settings are used for list type controls that have static options. The two list boxes are related and show the Data Value and Display Text of each enumeration value accordingly. The data value represents the value used 'behind-the-scenes' for the enumeration, whereas the display text shows the text that will be visible to the user of the page. To add a new entry to the list, type the data value to use in the text box at the bottom of the data values list and type the display text in the text box beneath the display text list. Then click the Save button to add the entry to the list.
Selecting an existing entry in either of the lists will show the values in the text boxes so they can be edited if required. Clicking Save will save the changes. Alternatively, clicking Remove will remove the selected enumeration entry from the list. The enumeration entries are displayed here in the same order as they will be shown on the generated page. Therefore the Up and Down buttons can be used to achieve the required order. This is done by clicking on the entry to move and then clicking the button that represents the required movement.
The Use these enumeration values for output display checkbox indicates whether these values should be used as a mapping between data and display for output information. For example, a page may display the current status of an order, but this status may be represented as a code within the system. Therefore, by setting the data values to the possible codes, and the display texts to the relevant display messages, the system will convert the code number to a helpful message for the user if this checkbox is ticked.
The following eight options allow us to constrain the acceptable values without restricting the user to a set list. The options that are available depend on which data type is selected and are described below.
Min Inclusive - This value can be used for number or date data types and specifies the minimum value that can be entered.
Max Inclusive - This value can be used for number or date data types and specifies the maximum value that can be entered.
Min Exclusive - This value can be used for number or date data types and is similar to Min Inclusive, except this specifies an exclusive minimum, i.e. the entered value must be greater than this value.
Max Exclusive - This value can be used for number or date data types and is similar to Max Inclusive, except this specifies an exclusive maximum, i.e. the entered value must be less than this value.
Min Length - This value can be used for the string data type and sets a minimum required length (number of characters) for the entered string.
Max Length - This value can be used for the string data type and sets a maximum required length (number of characters) for the entered string.
Length - This value can be used for the string data type and sets a required length (number of characters) for the entered string.
Pattern - This value can be used for the string and number data types and contains a regular expression that the entered values must match.