We’ve added an action called CollectionCalculate to the CollectionProcessors package that lets you provide a collection of records, specify a field by name, and indicate whether you’d like to add, multiply or average the values. The result is returned both as a decimal and a string.
|inputCollection||a collection of SObjects|
|fieldName||the name of a field on the objects that you’re passing in|
|operation||allowable values: “Average”, “Add”, “Multiply”|
|policyForNullAndEmptyFields||String. Allowable Values: “use0”, “use1”. If any other value is used or if this attribute is null, an empty field or null value in one of the passed in records will cause the action to fail. ‘use0’ replaces empty and null fields with zero and ‘use1’ replaces them with 1|