Control Tables
The control tables are a very simple method to create validity controls, that can be set up for certain entry fields. These control tables are used to define the coherence controls on the data being entered, and notably:
- In system transaction definition mode.
- In the definition of screens (development function, though the control allocation in a screen remains part of the setup).
- To add controls on a report parameters.
- In the definition of accouting transactions.
In a more general fashion, the control table allocation function is used to associate a control table to any of the screen field of the software in order to add additional coherence controls defined by the user. These controls are an addition to the carried out standard controls.
Each table is characterized by a 10-character alphanumeric code, and by associated control parameters. Up to three simultaneous controls can be defined; they can be of different types and are checked successively:
- mandatory value entry if a condition is met.
- presence in a vlaue list.
- exclusion from a value list.
- presence in a table.
- inclusion in an interval.
- check of a calculation formula.
Prerequisite
Refer to documentation Implementation
Screen management
The entry of these tables is made on three identical tabs, each defining a control.
Header
The screen header defines global conditions linked to the control, each following tab being identical and used to carry out successive controls (hence, only one tab is displayed in the remaining part of the document).
If an existence control in a table is declared in one of the tabs, the following tabs' conditions can exploit the fact that this table is on-line. So, for example, if one of the tables refers to table TABCUR (abbreviation TCU) to check that the entered field is a currency code, the following controls can intervene on the table field, such as [TCU]CURRND.
Block number 1
Code (field CTL) |
This code identifies the current record in a unique way. |
Description (field DES) |
Mandatory
Mandatory field (field OBL) |
This information indicates whether the field is mandatory or not. For an alphanumeric field, mandatory signifies that the zone cannot be empty. For a numerical field or date type, mandatory signifies that a nil value cannot be entered. |
Condition (field CTLOBL) |
If the Mandatory box is checked, it is possible to add an additional condition. If the condition is empty or the result of the condition is true, the field is mandatory. If not, a null value can be entered. |
Execution
Execution (field EXEACT) |
This field is used to define the context for the use of the control table :
|
Tab Control 1
In these tabs, there are successive controls to carry out (after a possible control of the mandatory field) on the field controlled by the table.
Besides the control type (which can be None if all necessary controls have already been defined in the header or in the previous tabs), there are the elements relating to the control (value list, table, intervals, etc.), as well as an error message to be displayed if the control is not satisfactory.
Control type
Control type (field TYPCTL) |
The control type (which can be None if all the required controls have already been defined in the header or in the previous tabs), can also take the following values :
|
Dependency (field DEPCTL) |
This field is only entered if the type is mandatory value. In this case, it is possible to link the choice list proposed to a choice previously made for another field in the same screen, itself controlled by another control table to whom the code is given, and which uses in one of its controls a first choice list. It is then possible to associate, in the values table that follows, a value controlled by one of the values in the linked control table (if no value is entered in the dependent value column, the code entered can be used irrespective of the value controlled in the dependency table). This mechanism is similar to the dependencies defined in themiscellaneous tables, but it introduces a constraint: in fact, this type of "dependant" table can only be used in the control table allocation in screen management (by entering a value in the column control table, a window opens, in order to enter an expression defining the control value in the context). |
Grid Values
List of values (field LSTVAL) |
Entered in this table, is the exhaustive list of authorised or prohibited values, according to whether the control type is Mandatory values or Prohibited values. Up to 30 values can be entered, with a dependence value if the control table is linked to another control table. |
Dependent values (field DEPVAL) |
Used to indicate the values corresponding to the dependence table. |
Parameters
Start range (field DEBUT) | ||||||||
These fields are used to define a minimum and maximum value between which the data must fall, when the control type is Value range. These ranges can only be numerical values. |
||||||||
End date (field FIN) | ||||||||
Table (field REFTAB) | ||||||||
When the control is of the type "table reference", the controlled field must correspond to a value of a table key, which is defined here The key used is that defined by the first table index (which obviously must be defined). |
||||||||
Expression (field FRM) | ||||||||
When the control is of the Expression type, a logic expression is defined here that must be true in order that the control is considered as carried out. The current value to be controlled is defined by the VALEUR variable. In this way, miscellaneous expressions can be inserted with the aid of the formula editor. For example :
|
||||||||
Error message (field MSG) | ||||||||
The error message that will be displayed if the control is not complied with is entered here. |
Specific Buttons
Copy
This button is used to copy the record definition from or to another folder. Block number 1
Block number 2
|