Setup > Usage > Statistics > Statistical triggers 

A tool that is used throughout the statistical parameterization is provided in the software. This tool is used to create a statistical database where the characteristics are as follows :

  • List of the triggering events managed by the software and that are used to start the update of the statistics database.
  • Definition of the statistics codes that are used to accumulate the amounts, based on a triggering events and criteria (1 to 8 generalized criteria, plus the company and the site).
  • Generation for each code of the totals according to the combination of the defined criteria.

These totals records can then be used by the reports or the enquiries accessible directly from a database record, to obtain the statistical tables.

The parameterization of triggering events is used to specify, for each event likely to be called by the software, the on-line data and the corresponding selection criteria.


SEEREFERTTO Refer to documentation Implementation

Screen management



Used to identify the triggering code.




The following fields are present on this tab :

The statistic trigger makes it possible to identify the element that will trigger the statistic.

  • Title (field INTIT)

It used to define a name associated with each record.



Tab General


Define in the first tab the general information linked to the triggering statistic : the principal table in which the aggregation is managed and the fields that are used to determine the totals record to be updated.

These fields are important, in the case where the STAT table that contains the data is structured by company, site and date (according to the periodicity) and that the sub-programme must know which fields in the triggering table the values to be used are found




The following fields are present on this tab :


  • Short title (field INTSHO)

Short title over 10 alphanumeric characters.

  • Module (field MODULE)

Module belonging to the setup. This field is used to specify whether the screen has to be created in the folder database. It is specified when the module linked to the screen is active in the folder.

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.

Block number 2

Defines the table is the principal table from which the fields that will serve to trigger the statistics update are defined. This table must be on line at the time of the call with a current record characteristic of the data to be accumulated.


  • Date field (field DATFLD)

Defined here is the field in the start table where the date attached to the record is found. This date is used to determine in which period the statistical value related to the record will be totaled, taking into account the periodicity of the chosen calculated.

  • Company field (field CPYFLD)

Defined here is the field in the triggering table where the company code attached to the record is found. If this field, or if the site field are entered, the statistics applied to this code can be declined by the company.

  • Site field (field FCYFLD)

Defined here is the field in the start table where the site code attached to the record is found. If this field is entered, the statistics using this code can be declined by site.

Block number 4



Tab Advanced


The second tab is used to complete the description of the triggering context, when its more complex, notable :

  • by describing, in a first grid, the links are used to provoke the reading of other linked tables during the totals processes. The order of entry of the tables in the grid is important, because a table can be linked in cascade to the principal table and to any tables that precede it.
  • by giving the logical conditions that must be carried out so that the total can be made
  • by defining the variables (via the calculation formulas) usable directly in the statistics definition.




The following fields are present on this tab :

Table number 1

  • No. (field NUMLIG3)


Defines the table that will be placed on line during the totaling process, where the record is determined by a value for the link key. This will also be used as a basis for the statistical criteria and the totaled values on the fields in this table.

  • Abbreviation (field ABRLNK)

It corresponds to the abbreviation under which the linked table is open.

If this field is not populated, the default abbreviation of the table is used. It is particularly useful to enter an abbreviation if the table appears several times in the grid, since several linked lines in the same table need to be on line simultaneously.

  • Link key (field CLELNK)

It defines the table key code used to read the linked lines. By default, the first key of the table is used.

  • Link expression (field EXPLNK)

This field is defined as one or more calculated expressions separated by a semi colon. Each expression is evaluated, and the result used to identify the value of the key used to perform the join. When multiple joins are authorized, only the first elements of the key can be given.

In the expressions, constants can be used, as well as fields coming from the tables previously defined in the link list.

Table number 2

  • No. (field NUMLIG1)


  • Triggering criteria (field CRI)

Used to define a criterion in the form of a logical expression can be used to intervene in all the on-line tables, the constants and the functions.

Only the lines for which the condition evaluation returns a result that is not null (i.e. true) are involved in the data extraction.

Table number 3

  • No. (field NUMLIG2)


  • Variable (field VARNAM)

Define the name of a variable used directly in the statistics totals based on the triggering event, to avoid having to define the calculated expressions based on the fields in the on line tables.

  • Title (field VARINTIT)

Title associated to the previous code.

  • Expression (field VARFOR)

Define the calculation formula corresponding to the variable.

This formula is a calculated expression can includes constants, operators, functions and all the on line variable in the aggregation context.

  • Currency (field VARCUR)

In order to create the totals on the amounts express in different automatically converted currencies, there is the possibility to enter a constant or a field defining a currency code here. Following this the currency code in which each total must be managed will be entered in the statistics total definition.



List of the different standard triggering events

The standard triggering events are documented in the documentation, organized by module, and accessible in the following link.

It should be noted that in the case of complex documents (of the type header and line), two triggering events can exist, one called once by the header and the other called once by line. One or other is chosen according to the level of detail required for the aggregation.

Specific Buttons

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

Block number 1

  • field OBJET


  • field CLES


Block number 2

  • From folder (field DOSORG)

This field is used to define 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)

This field used to define the folder in which the record is going be copied. The possible syntaxes are described in the dedicated appendix.


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

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 :

Non-existent field

The proposed link field does not exist in the table.

Non-existent field

The company, site or date field does not exist in the table.

Incorrect expression - Syntax error

The calculated expression defining the variable value is not correct.

Tables used

SEEREFERTTO Refer to documentation Implementation