ValueTreeRowCollection.Total

Syntax:

Total(<Column>, <IncludeSubordinates>)

Parameters:

<Column> (required)

Type: Number; String; ValueTreeColumn.
Column for which totals are calculated.
You can enter a column index, column name or a value tree column as a parameter value.

<IncludeSubordinates> (optional)

Type: Boolean.
Defines whether or not the totals for subordinate rows (if there are any) will be included in the sum. True - totals will be included.
Default value: False.

Returned value:

Type: Number; Undefined.

Description:

Sums up the values of all rows in the specified column.
If there is a single type defined for the column, totaling would cause an attempt to cast values to the Number type.
If no types are assigned to the column, totaling will include only values of the Number type, ignoring values of other types.
If there are multiple types in the column including Number, then totaling will include only values of the Number type, ignoring values of other types.
If there are multiple types in the column excluding Number, the result will be Undefined.

Availability:

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

Example:

ProductionCost = ContentRows.Total("Sum");

    

1C:Enterprise Developer's Community