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.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Presentation

Used to identify the triggering code.

Close

 

Fields

The following fields are present on this tab :

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

  • Description (field INTIT)

Use this field to assign a description to each record.

Close

 

Tab General

Presentation

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

Close

 

Fields

The following fields are present on this tab :

Characteristics

  • Short description (field INTSHO)

Short title over 10 alphanumeric characters.

  • Module (field MODULE)

Select a module for the setup.

Use this field to specify if the screen has to be created in the folder database. This is the case when the module linked to the screen is active on the folder.

An activity code is used to:

  • Make an element optional 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

If the activity code is disabled:

  • The marked element will not be useable
  • The associated code will not be generated nor 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.

Options

  • 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

Close

 

Tab Advanced

Presentation

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.

 

Fields

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.

  • Description (field VARINTIT)

Title associated with 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 included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will 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.

Menu Bar

Documentation / Paragraphs

This menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • 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 you can modify it at launch time.

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