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
Refer to documentation Implementation
Screen management
Header
Used to identify the triggering code.
Code (field COD) |
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. |
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
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. |
Activity code (field CODACT) |
An activity code is used to:
If the activity code is disabled:
|
Block number 2
Triggering table (field RLGTBL) |
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
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.
No. (field NUMLIG3) |
Linked tables (field TBL) |
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. |
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. |
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
Copy
This button is used to copy the record definition from or to another folder. Block number 1
Block number 2
|