Setup > General parameters > 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 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

SEEREFERTTO Refer to documentation Implementation

Screen management

The entry of these tables is made on three identical tabs, each defining a control.

Header

Presentation

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.

Close

 

Fields

The following fields are present on this tab :

Block number 1

This code identifies the created records in a unique manner.

  • 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 :

  • Interactive signifies that the control is only made on entry (whether in client-server or Web mode)
  • Import/Web service  signifies this this control is only carried out if the user is not available.
  • Always signifies that the control is always carried out.

Close

 

Tab Control 1

Presentation

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.

Close

 

Fields

The following fields are present on this tab :

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 :

  • mandatory value : only one of the values defined in the control table is authorized.
  • prohibited value : all values are authorized, except the values listed in the control table.
  • value range : the authorized values are defined within a range.
  • table reference : the value must correspond to a principal key value in a table defined elsewhere.
  • expression : a logic expression must be verified by a control value.

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)

 

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 :

Formula

Explanation

dayn(VALEUR)<>3

The date must not be a Wednesday

VALEUR>"ABC" & VALEUR<"EFG"

Range between two character strings

mod(VALEUR,3)=0

The number must be a multiple of 3

  • Error message (field MSG)

The error message that will be displayed if the control is not complied with is entered here.

Close

 

Specific Buttons

The following fields are included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Indicate the folder from which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

  • All folders (field TOUDOS)

This option is used to copy the record to all the folders defined in the dictionary (ADOSSIER table from the current solution).

  • To folder (field DOSDES)

Indicate the folder in which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

Close

This button is used to copy the record definition from or to another folder.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Incorrect expression

This message is displayed if an incorrect calculation formula (from a syntax point of view) has been entered.

xx is not dependent on CTRL

Value xx entered in the dependent value table is not in the list of the possible choices in control table CTRL that has been entered in field Dependence.

Tables used

SEEREFERTTO Refer to documentation Implementation