InformationRegisterRecordSet.<Information register name>.Total

Syntax:

Total(<FieldName>)

Parameters:

<FieldName> (required)

Type: String.
Name of the set's record field for which you need to calculate a total.

Returned value:

Type: Number; Undefined.
Numeric value of the calculation result.

Description:

Calculates the values of all rows in the specified set field.
If only one type is set for the record set field, then by calculating, there will be an attempt to transform values to the type Number.
If types are not assigned to the field, then only values of type Number will participate in the summing process; values of other types will be ignored.
If there are several types for the field, including Number, then only values of type Number will be part of the calculating process; values of other types will be ignored.
If there are several types for the field but not Number, then the result will be the value Undefined.

Availability:

Server, thick client, external connection, Mobile application (server).

Example:

AverageRate = RatesSet.Total("Rate") / RatesSet.Count();
Message("Average rate " + AverageRate);


    

1C:Enterprise Developer's Community