Supervisor administration statistics

Full version 7 functionApplication/Contractx3/$$PRODClassSTATS('code')RepresentationSTATS~codeFacet$cube

This function allows you to display statistical inquiries based on the statistics definition.

The statistics are defined by the function called GESPS2.

IntroductionCreating a statistical inquiryAccessing the statistical pageEntering information on a statistical page
Displaying a statistical pageAdditional parametersFormatting rules for the amountsLimits of the statistical function

1. Introduction

In version 6, when a statistical code is created by the statistic definition (GESPS2), the validation builds a small program that updates the statistical tables when a creation or a modification is done in the object. The statistical inquiry is a generic program that reads the data in the statistical table and displays the result in a dedicated screen.

In version 7, the validation adds a dedicated program that generates a JSON feed and a prototype to display the result of a statistical inquiry.

2. Creating a statistical inquiry

Creating a statistical inquiry is still done through the 'GESPS2' function by accessing Sage X3 People version 6 (this opens a Classic screen). Nothing has changed in the way the requests are created; however, when the request is validated the supervisor creates the following:

3. Accessing the statistical inquiry

To access the statistical inquiry for a request called 'MYSTAT', it is necessary to create a menu item with the following parameters:

This link provides access to the statistical display including a graphical representation of the lines.

Additional parameters can be sent through the URL with the &parameter=value syntax, and will be explained later.

Once this is done, clicking the link associated with the menu item gives access to the request display and execution function.

4. Entering information on a statistical page

Entering information on this page will display the statistical inquiry result at the first level.

5. Displaying a statistical page

The statistical page will be displayed with a graphical representation and a grid presenting the lines of data. Drill down can be done through different levels.

6. Additional parameters

The URL of the page can accept other parameters. The default URL generated from the set up of the menu item is the following:

(server_URL)/html/main.html?url=/sdata/x3/$$prod/FOLDER/STATS('STAT_NAM')?representation=STATS~STAT_NAM.$cube

Where:
* STAT_NAM is the name of the statistic.
* FOLDER is the Sage X3 People folder in which the statistic is executed.

Additional parameters can be added at the end of the URL in the following format:

&parameter_name=value

For example, you can have a URL that ends with:
...STATS('STAT_NAM')?representation=STATS~STAT_NAM.$cube&DATBEG1=2013-01-01&DATEND1=2013-12-31

The list of parameters available is provided in the following table:

Parameter namePossible valuesDefault valueUseExample
DATBEG1A date value in
yyyy-mm-dd format.
User parameter DATSTADEB valueThe range of dates used for calculating the statistical data.&DATBEG1=2013-01-01
DATEND1User parameter DATSTAFIN value&DATEND1=2013-12-31
DATBEG2A date value in
yyyy-mm-dd format.
The previous range of date with the same length as DATBEG1,DATEND1.The range of dates used for calculating the previous period statistical data.&DATBEG2=2012-01-01
DATEND2&DATEND2=2012-12-31
COMPANYA company codeNoneFilters the statistical data.
Used only if the statistical code is set up at the company or site level.
If the parameter is present but empty (1), the calculation is done on all the companies.
If the parameter is omitted (2), the default value is the company associated with the default site of the user for the module the statistics belong to.
&COMPANY=SAGE
FACILITYA facility (site) code.NoneFilters the statistical data.
Used only if the statistical code is set up at the site level.
If the parameter is present but empty (1), the calculation is done on all the sites.
If the parameter is omitted (2), the default value is the default site of the user for the module the statistics belong to.
&FACILITY=PARIS
xxxx (where xxxx is the name of a field in the statistical definition (3)).A value with the right data type.NoneFilters the statistical data on the value of the parameter.
If a value is given for the Nth field without values given for the (N-1)th values, the value is not used.
If empty, no filter is given.
If the N first values are given, the statistical data displays at level N+1.
&ITEM=BOOK025
&MFI_ITMREF=CD100
PORTVIEWA portal view code.NoneSets the values not defined by using the formula calculated in the portal view definition (date range, companies and sites, and other values).
If empty, the calculation is done on all of the sites.
&PORTVIEW=MYVIEW
$axesAxes definitionNoneSets the axes to a default value (SData format for multi-dimensional format) in JSURL format.
$slicerSlicer definitionNoneSets the slicer to a default value (SData format for multi-dimensional format) in JSURL format.

Comments:
(1) In a portal view, the parameter is considered as empty if a formula returning an empty value is present (for example,"" or space$(0)). In the URL, the corresponding case is "&PARAMETER=&OTHERPARAM=...".

(2) In a portal view, the parameter is considered absent if no formula is entered for the parameter. In the URL, the corresponding case is that the string "&PARAMETER =..." is not present.

(3) The name of the field is the field found in the dictionary definition. If an abbreviation is given on the line, the name is prefixed by the abbreviation followed by an underscore. For example, if a first 'ITMREF' field is defined with the 'MFM' abbreviation, and a second 'ITMREF' field is defined with the 'MFI' abbreviation, the field codes that can be sent as parameters will be 'MFM_ITMREF' and 'MFI_ITMREF'.

7. Formatting rules for the amounts

The amounts presented in the statistical inquiries are formatted with the following rules:

Note: If the FMTSTA parameter is modified, you must re-validate the statistical parameters to use the new format.

8. Limits of the statistical function