You are here: Transaction Rules > Transaction Elements > Math Elements > AGGREGATEFUNCTION

AGGREGATEFUNCTION

Description

AGGREGATEFUNCTION is used to perform functions on arrays.  Functions include counting elements, summing elements and retrieving specific element data from the array.

AGGREGATEFUNCTION Element/Attribute Table

Element

Attribute

Attribute Value

Result

<MathVariable>

TYPE

AGGREGATEFUNCTION

The name of a previously defined array.

 

METHOD

COUNT

Returns the number of elements in the array.

   

INDEX

Allows the configuror to retrieve specific data from position provided by an additional attribute, INDEX. Whatever the means to provide INDEX with a value, it must be a positive integer less than the number of elements in the array. If not, an exception will occur.

   

SUM

Returns the sum of all the elements in the array. The elements of the array must be one of the numeric data types.

XML Example

<MathVariable VARIABLENAME="SegmentCount" TYPE="AGGREGATEFUNCTION" METHOD="COUNT" DATATYPE="INTEGER">Segments</MathVariable>

 

<MathVariable VARIABLENAME="LastPremiumYear" TYPE="AGGREGATEFUNCTION" METHOD="INDEX" INDEX="PremiumIterations-1" DATATYPE="INTEGER">PremiumYearArray</MathVariable> 

Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices