4D v16.3

On a Series

Home

 
4D v16.3
On a Series

On a Series  


 

 

The functions of this theme perform calculations on a series of values.

The Average, Max, Min, Sum, Sum squares, Std deviation and Variance functions are applied to fields or arrays:

  • When applied to fields, they use the current selection of records,
  • When applied to arrays, they use array elements.

Note that when they are applied to fields, the Sum squares, Std deviation et Variance functions can be used only during printing.

All these functions work on numeric data only and return numeric values.

When Average, Max, Min or Sum are used on a field outside a printing operation, they may have to load each record in the current selection to calculate the result. If there are many records, this process may take some time. To limit the processing time, you can index the field.

Note: When the operation is long, a progress thermometer appears. This thermometer has a Stop button that lets the user interrupt the operation. If the user clicks this button, the OK variable is set to 0. If the operation is completed correctly, the OK variable is set to 1.

When statistical functions are used in a report, they behave in a specific way because the report itself must load each record. Use these functions in a form or object method when printing with the PRINT SELECTION command or when printing by choosing Print from the File menu in the Design environment.

When you use these functions in a report, the values that are returned are reliable only at break level 0, and only when break processing is turned on. This means that they are useful only at the end of a report, after all the records have been processed.

You would use these functions only in an object method for a non-enterable area that is included in the B0 Break area.

Remember that the field passed as a parameter to the statistical function must be a numeric.



See also 

Average
Max
Min
Std deviation
Sum
Sum squares
Variance

 
PROPERTIES 

Product: 4D
Theme: On a Series

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)