This function is used to define a database of setups used by the software. Each setup is identified by its name; it is attached to a functional module, and within each module it is classified by group. It has characteristics such as the type, the definition level and the possible values. It is possible to associate it with a global variable; this makes it possible for the Supervisor to load this global variable via the setup value upon connection to the folder or a user change.

In the case of a context change (company, site), or when no variable is associated with the setup, the value of the setup can be read in any program via one of the following calls:

Call PARAM(SITE,PARAM,VALEUR) From ADOVAL

Call PARAMUTIL(PARAM,VALEUR,USER,"") From SUBAUS

It is important to note that the corresponding sub-programmed uses a data type that is always of the character string type; when the source setup is of the type date or numeric, remember to transcode the returned value if necessary. When it is a date, a simple assignment is sufficient: in fact the Safe X3 engine manages the assignment of the date type variable with a value of the character string type. In the numeric case, it is necessary to write VALNUM=val(VALUE).

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Entry screen

The entry of the setups is made in a tab, the selection window being a window with keys made up of 3 sections (the chapter, the group, and then the setup code).

It is possible to add new setups in the case of specific/custom developments. Warning, to save these setups in the case of version change or folder revalidation, it is essential to protect them with a specific/custom activity code (starting with X, Y or Z). To avoid conflicts with any added setups, it is necessary to use the standard naming convention (start the names of these setups with X, Y or Z).

It is possible to add these specific setups to the existing standard chapters or to a specific chapter created beforehand. In order to add a specific chapter it is necessary to add a code starting with X, Y or Z in the miscellaneous table no. 901.

The different setups that exist for all the functional modules are explained in the Prerequisite chapters in the documentation for the functions that use them. Each setup has a descriptive record that can be called by the definition of the setup or the entry of the setup value.

Specific Buttons

Copy

This button is used to complete and compile 2 processings: AGLOBVAR and AGLOB+chapter

Copy

This button is used to copy the activity code definition to another folder. Caution: there is no copy of the linked activity code.

Error messages

[<<<
[>>>>MENU_FLOTTANT_DIV]

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

Parameter exists already

An attempt has been made to create a setup that exists already under the same name in another chapter.

The variable must start with G

The global variables are standardized and must start with the letter G.

Variable exists already

The global variable is already initialized by another setup.

Incorrect value

A value incompatible with the data type has been entered in the values table.

Non-existent processing

The name of a non-existent processing control has been entered.

Tables used

SEEREFERTTO Refer to documentation Implementation

Technical annex: formulas that can be used to lock the entry

The formula entered in this field used to control the modification is very important when it is required to lock the setup values at a given level, even if this setup can still be modified.

This condition is notably interesting for some legislation which limit the possible setups.

At this stage, the following variables are notably available:

  • LEG is the current legislation. This value is empty when entering a setup value at general level. In all other cases, it is assigned, either by entering the setup at legislation level, or by defining it at company level (a company is attached to a legislation) or at site level (a site is attached to a company which is attached to a legislation) or at user level (attached to a default site for the corresponding module).
  • SOC is the current company. This value is empty when entering a setup value at general or legislation level, otherwise it is assigned according to the same principle described above.
  • SIT is the current site. This value is empty when entering a setup value at general, company or legislation level, otherwise it is assigned according to the same principle described above.
  • USR is the user for which the authorizations are to be entered (not the same as GUSER, which is the current user entering the authorizations).

The variable GNBLEG is available. It gives the number of active legislations in the folder. These active legislations are given by the GDOSLEG grid (indexes vary from 1 to GNBLEG).

Here are some examples of conditions which help understand how to lock the setups:

When it is required to enter a setup value, no matter the definition level, if the German legislation is used in this folder, the formula is:
find("GER",GDOSLEG(1..GNBLEG))=0
As a matter of fact, if "GER" is found in the legislation grid, the find function sends a value different from zero, which means that the condition is false and that no entry is possible.

For Italian and Spanish legislations, when it is required that a setup normally defined at the level of each site cannot have different values by site, following formula is to be used:
find(LEG,"ITA","SPA")=0 or SIT=""
If LEG is defined and has the value "ITA" or "SPA", the first part of the condition is false; SIT must then be empty (that is that the current level is company or above) for the setup to be modified.

When it is required that a setup that can be defined at user level can be modified only at general level or only for the administrator, following formula is to be used:
LEG="" or USR=GSUPER
If LEG is empty, the current level is the general one. If USR is defined and has value GSUPER (super-user), the value of the general administrator is to be entered. In both cases, the formula is true and the setup can be entered.

If only the administrator is authorized to modify a user value, following formula is to be used:
GUSER=GSUPER