Development > Data and parameters > Development setup > Parameter definitions 

This function is used to define a database of parameters used by the software. Each parameter is identified by its name ; it is attached to a functional module and within each module is classified by group. It has available characteristics such as the type, the definition level and possible values. There is the possibility to associate with it a global variable ; this is used by the supervisor to load this global variable with the value of the parameter, during the connection to the folder or on a change of user.

In the case of a context change (company, site) or when a variable is not associated with a parameter, the value of a parameter can be read by any program by means of 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-program uses a data type that is always of the character string type ; when the source parameter 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 ADONIX 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(VALEUR). 

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Entry screen

Presentation

The entry of the parameters is made in a tab, the selection window being a window with branching keys with 3 parts (the chapter, the group then the code of the parameter).

It is possible to add new parameters in the case of specific/custom developments. Warning, to save these parameters 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 parameters, it is necessary to use the standard naming convention (start the names of these parameters with X, Y or Z).

There is the possibility to add these custom/specific parameters in the existing standard chapters or even in a custom/specific chapter that has previously been created. The addition of a specific/custom chapter is mad by adding a code starting with X, Y or Z in miscellaneous table 901.

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

Close

 

Fields

The following fields are present on this tab :

Block number 1

The chapter, defined in miscellaneous table number 901, identifies the functional domain to which the parameter is attached.

  • Parameter (field PARAM)

A parameter is characterised by :

  • A chapter (miscellaneous table no 901).
  • A code (10 alphanumeric).
  • Title (field NAME)

Destined notably to figure in the reports and the screens in which the record code can be entered or selected. This text is used to give a clear description to the record concerned.

Block number 2

The group code, defined by miscellaneous table number 903, is used to group the parameters of a single chapter, in order to organize them and to facilitate their parameterization. In fact, there is the possibility to define the values sets by group of parameters.

Characteristics

  • Definition level (field NIVDEF)

The definition level is used to characterized the deepest level of detail possible to associate a value for each parameter. If, in a given context, no value exists at the defined level, ascend up successive levels until a value is found. It is therefore possible to define a default value for the levels above the bottom level of the definition, in order to only manage the specific cases of the lowest level.

The definition levels possible, defined by the local menu 987, are, in descending order :

  • Folder: a single global value is then defined for all the folder.
  • Legislation :a value is defined by legislation. This supposes that in the parameter usage context, a current legislation can be defined (it is carried out in practice by means of the current company in the usage context).
  • Company : a value is defined by company. This supposes that in the parameter usage context, a current company can be defined.
  • Site: a value is defined by site. This supposes that in the parameter usage context, a site can be defined.
  • User : a value for each user (and defined at the time of the connection, remembering that if it does not exist, a search is mad for the value associated by default with the user for the module to which the parameter is attached).
  • Value type (field TYPVAL)

Defined here is the internal type for the value and the local menu number if there is one.

An activity code is used to:

  • make optional an element in the dictionary if the value associated with the activity code is null.
  • identify the specific/custom elements if they are marked with a code starting with X, Y or Z.
  • size a maximum number of lines when the activity code marks elements from a grid.

In this way, if the activity code is disabled, the marked element will not be useable, and the associated code (if any) will neither be generated nor can be activated.

  • Local menu no. (field NOLIB)

Defined here is the internal type for the value and the local menu number if there is one.

A parameter can be the key to a record managed by an OBJect (for example, a country code, a customer code, a sequence number counter, a product group, a user, etc.). If this is the case, a code for the object is given here ; this is used to automatically make available all the controls associated with the entry of the parameter.

In addition, it is possible to specify the parameter to be passed to the object management, when this is manages a table with a key of two components. The parameter CCEDSP1 "Dimension axis 1 for distribution" uses this field to indicate the number of the analytical axis.

In addition, it is possible to specify one or more selection options to filter the possible values for the parameter. These options are defined in the object in the "Selection" tab. The CPTRES parameter uses the filter option on the account OBJect to authorized only the general accounts.

  • Parameter (field PAROBJ)

 

  • Selection options (field SELOPT)

 

  • Control processing (field TRAIT)

The process section is used to define the name of a process that will be called to make additional controls on the validity of the entry of the parameters. If this process is defined, then a sub-program must exist defined as follows in the process :

Subprog VERF_PARAM(PARAM,VALEUR,OK)
Value Char PARAM     # Name of the parameter being entered
Value Char VALEUR    # Entered value to be controlled
Variable Integer OK    # 1 if the control is satisfactory, 0 if the entry is incorrect
                                 # If OK=0, enter the variable GMESSAGE with the error message

End

An example of its use is given for the sequence number type variables in the documents. When they should not exceed a length of 15 characters, a SUBANM process can be called.

To facilitate usage, it can be useful to store the parameter value in a global variable. for standard reasons, the name of this variable starts with the letter "G" for the standard, with one of the letters "X", "Y" or "Z" for specific/custom. This variable belongs to the class [V].

The fact of giving the name to a variable provokes the automatic generation of a declaration process :

  • WWAGLOBVAR for folder, company, site or legislation parameter
  • WWAGLOBUSR for user parameter

Thus when connected to the older, the global variable is loaded with the parameter value.

If the variable is defined at a lower level (site, company, legislation), it is likely to change value when the site, company or legislation changes ; it is in this case the responsibility of the developer to re-read the parameter values and to modify the values of the corresponding variables. A sub-programme for each module is available for this, which can be called by :

           Call GLOBVAR(SITE) From WWGLOBXXX

In parameter creation, in the case where the variable is not yet created in the standard dictionary, the supervisor proposes to create it.

In parameter update, the variable is not modifiable. However, there is the possibility to intervene in this field from the variables dictionary :

  • to assign a variable to the parameter, by assigning the parameter code, in the global variable record.
  • to delete a variable associated with the parameter, by deleting the parameter code, in the global variable record.

Note : the deletion of a global variable associated with a parameter is possible. In this case, the parameter is no longer linked to a global variable.

  • to assign a variable to the parameter, by assigning the parameter code, in the global variable record.

Table List of values

  • Values (field VALUES)

It is possible to define a list of values that will be proposed during the entry of the parameter with the help of the selection function, accessible from the right click of the mouse.

Properties

  • Changeable (field MODIF)

Used to define if a value can be manually modified by the user with the function parameter values. If this is not the case, only a program is for modifying ; for example, the TYPDBA parameter, which defines the database used, only reflects that it has been defined during the creation or update of a folder : it can therefore not be manually modified).

  • Off value (field VALFLG)

The Ex value check box is used, if it is ticked to authorize the entry of values that fall outside of the list (which then becomes simply a group of "suggested values") or, conversely to impose a strict selection.

  • Modify by user (field AUSMODIF)

This indicator, modifiable only if the variable has been defined at the User level, is used to identify if a user can modify the value themselves(via the personal choices management function), or if a user other than the general administrator can modify this parameter in user management.

  • Folder default value (field VALDEF)

This indicator, only modifiable if the variable has been defined at the User level, is used to identify if an inheritance is authorised from a superior level or if a value is imposed that can only be entered at the user level (in this case, its non assignment in the user record will be interpreted as an absence of the value).

This access code is used to to limit access to the current record for certain users.
If the field is entered, only the users having this access code in their profiles can view and modify this record.

Condition

  • Modification condition (field CNDMOD)

Close

 

Specific Buttons

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

This button is used to copy the activity code definition to another folder. Warning, the linked activity code is not copied.

Menu Bar

Documentation / Paragraphs

This function is used to access the documentation management on the first paragraph of the documentation (if there is one) associated to the current record.

Documentation / Links

This function is used to access the links management. It is used to define the links between the current and other records (for example the links between functions and setups). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu is used to launch a documentation generation. The generation can also be launched from the [Generation] button at the bottom of the window.

Three types of generation can be launched one by one or simultaneously:

  • the generation of the documentation structure from the dictionary (tables ADOCUMENT, ADOCBLB, ADOCCLB).
  • the generation of the documentation from the previous tables.
  • the generation of the field documentation.

The range suggested by default takes into account the current record but it can be modified upon launch.

Error messages

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 parameter that exists already under the same name in another chapter.

The variable must start with G

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

Variable exists already

The global variable is already initialised by another parameter.

Incorrect value

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

Non-existent process

The name of a non existent process control has been entered.

Tables used

SEEREFERTTO Refer to documentation Implementation