IIF
IIF (Immediate IF) returns a value based on the evaluation of an expression (provided in the EXPRESSION attribute). If the expression evaluates to true, then the first value is assigned to the MathVariable. If false, the second value is assigned to the MathVariable.
TYPE = IIF | |||
---|---|---|---|
Element | Attribute | Attribute Value | Element Value |
<MathVariable> |
TYPE |
IIF |
A comma-separated list of two math variables or fields. The MathVariable is set to the first value if the EXPRESSION attribute evaluates to true; the second if EXPRESSION evaluates to false. |
EXPRESSION |
Condition to evaluate. See operators for more details. |
||
|
DATATYPE |
DATETEXTINTEGERDECIMAL |
|
|
ROUND |
Integer |
Optional attribute may be used when DATATYPE="DECIMAL" |
|
DEFAULT |
String |
|
|
LOG |
Yes / No |
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. |
XML Example
<MathVariable VARIABLENAME="APPEndDateMV" TYPE="IIF" EXPRESSION="DaysDiffOf(EffectiveDateMV,APPEndDateMV)<=0" DATATYPE="DATE">MaturityDate,APPEndDateMV</MathVariable>