skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Sum
 

Try Corticon Now

Sum

SYNTAX

<Collection.attribute> ->sum

DESCRIPTION

Sums the values of the specified <attribute> for all elements in <Collection>. <attribute> must be a numeric data type. <Collection> must be expressed as a unique alias.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

This Rulesheet uses the ->sum function to add all decimal1 attributes within collection1. Note the use of unique alias collection1 to represent the collection of Entity2 associated with Entity1

SAMPLE TEST

A sample Ruletest provides 3 elements in collection1. Input and Output panels are shown below.