The TOTAL function will add the values of a given object property together for all instances of the object in a specified collection property. Optional criteria may be specified to include only specific objects within the collection being processed.
This function takes three parameters. The first is the object collection property, and the second is the object property whose value is to be summed in each object instance. An optional third parameter can be provided to include only certain object instances within the collection in this operation. This function supports the integral number and decimal number return types.
The object property values are totalled by the function based on the function’s context, not the data type of the object property definition. This is important to note when the context is in an integral number, and the properties to be totaled are decimals. In this situation, the fractional portion of the properties will be truncated from the values prior to being added together.