SumFields
Adds the values of all child fields of the specified type and assigns the result to the current field. You can also use this action to sum the values of the specified variable for all child objects.
Syntax
bool SumFields (StrParam)Parameters
String value of a Field object's Type property or the name of a variable. Smart parameters are supported.Returns
Always True.Level
All.Details
Sums captured values of any child Field if a child object's Type property is identical to the Type you specify as a parameter. Alternatively, the actions sums values assigned to a variable of the child Field objects. In this case, the variable is the same as the variable entered as a parameter.Remember: This
action must be applied to the parent object.
- Example
SumFields("Detail") SumFields("LineTotal")The first action in the example sums the captured values of Detail Field objects that are children of the current Field object.
The second action in the example sums values assigned to the LineTotal variable of child Field objects.
In both cases, the result is a Long number.