COLLECTIONVALUE
A math variable statement of type COLLECTIONVALUE returns the value associated to a given key. The collection must be created prior to using COLLECTIONVALUE. The COLLECTION MathVariable is used to create collections.
| TYPE=COLLECTIONVALUE | |||||
|---|---|---|---|---|---|
| Element | Element Value | Attributes | Parent Element | Description | Element/Attribute Value |
|
<MathVariable>
|
The name of the collection. |
||||
|
|
TYPE |
COLLECTIONVALUE |
|||
|
KEY |
MathVariable or string literal whose value is the key from which the associated value is returned. Do not use KEY if KEYFIELD is configured. |
||||
|
KEYFIELD |
Math Variable to define key use and to access the key in the collection. |
String. Do not use KEYFIELD if KEY is configured. |
|||
|
DATATYPE |
Required attribute:
DATATYPE must match the data type of the field or math variable in the element name. |
||||
|
ROUND |
Integer that sets the rounding for DECIMAL data types.
|
||||
| DEFAULT | Use a default value for math variable in case the system does not return a result, to avoid a null result. For example, integer may have the default value of -999999999, a decimal may have the default value of 0. | ||||
|
LOG |
Yes: the result is stored in AsActivityMath table to be used by other activities. No: the result is not stored. This is the default behavior. |
||||
|
CLEARVALUE |
Value: Yes / No Default Value: No |
Yes: The value of the math variable will be deleted after the execution of all the Attached Rules at the end of activity processing and will not be visible on the Math tab in the Activity details screen. No: The value of the math variable will be retained after activity processing and will be displayed in the Math tab in the Activity details screen. |
|||
XML Examples
<MathVariable VARIABLENAME="FixedFundGUID" TYPE="COLLECTIONVALUE" KEY="1601" ATATYPE="TEXT">FundGUIDs</MathVariable>
<MathVariable VARIABLENAME="IssueAge" TYPE="COLLECTIONVALUE" KEY="SegmentIssueAge" DATATYPE="INTEGER" DEFAULT="-999999999">SegmentCollection</MathVariable>
<MathVariable VARIABLENAME="BaseFace" TYPE="COLLECTIONVALUE" KEY="SegmentAmount" DATATYPE="DECIMAL" DEFAULT="-999999999">SegmentCollection
</MathVariable>