Field Definition
Field definitions represent a data type for a dynamic field. They define the specifics of a field, such as the data type, the length and additional validations such as a regular expression. Field definitions are used to extend a table (like adding a new column to the table), and they are also used to create the definitions for Flex Code Definitions and Record Definitions.
Field | Description |
---|---|
Code |
The unique identifier of the field definition |
Description |
The text that would appear in a LOV on fields |
Data Type |
Number, date or character string |
Decimals |
The number of decimals. Only relevant for data type number. |
Length |
The maximal length of this field. Date fields ignore this attribute. |
Validation |
Optional dynamic logic validation against which the value of this field is validated |
The same field definition can be re-used multiple times.
The validation imposes a restriction on the format. Consider the following example, the second and third digit must be separated by a decimal point. How to set up a dynamic logic validation is specified in the Developer Guide for Dynamic Logic. A field can have zero or one validation.
To clarify the purpose of these validations, consider the following examples:
-
The numerical value must be between 1 and 24
-
A restriction on the format based on a regular expression
-
A check digit calculation for a bank account number
Consider the following example: _A user wants to update the Body Mass Index (BMI). The first step is to create a field that can store the BMI.
The user creates a new field with the following attributes:_
-
Code: BMI
-
Description: Body Mass Index
-
Data Type: char
-
Length: 5
-
Validation: