Your browser does not support JavaScript!
You are here: Transaction Rules > Transaction Elements > Math Elements > MathIF Element

MathIF Element

Description

MathIF acts as conditional comparison statement for evaluation by the system. If the expression in the IF attribute is true, then all of the elements configured within the MathIF statement will be executed. If the expression is false, the system will ignore the MathIF statement contents.  

MathIF allows the user to execute several elements if one conditional statement is true, while an IIF statement assigns only one variable for each IIF condition.

Note:  In ScreenMath, the MathIF and MathLoop elements may be nested within other MathIF statements.Outside ScreenMath, the MathIF element may contain only MathVariable elements.

MathIF Element/Attribute Table
Attribute/Tag Definition Attributes Element/Attribute Value and Description

<MathIF>

Opening and closing tag for MathIF statement.    
  IF

String: Specifies an expression evaluating true or false. If the expression is true, the MathVariable statements are executed.

If the MathIF is used in Segment screen or Address screen configuration, this expression can reference SegmentGUID or AddressGUID, respectively.

<MathVariable>

See MathVariable Element.

 

 

<MathLoop>

See MathLoop Element.

 

Note: This element is used only in ScreenMath.

XML Examples

MathIF Example in ScreenMath

<MathIF IF="OneTimePremiumAmountMV &gt; 0">
<MathVariable VARIABLENAME="COIDue" TYPE="EXPRESSION" DATATYPE="DECIMAL" ROUND="2">OneTimePremiumAmountMV</MathVariable>
<MathIF IF="(SegmentStatus = GraceStatus) And (SegmentGraceAmount &lt;=COIDue) ">
<MathVariable VARIABLENAME="SegmentStatus" TYPE="EXPRESSION" DATATYPE="TEXT">ActiveStatus</MathVariable>
<MathVariable VARIABLENAME="SegmentGraceAmount" TYPE="VALUE" DATATYPE="DECIMAL">0</MathVariable>
</MathIF>
<MathLoop VARIABLENAME="Segments" TYPE="SEGMENT" CONDITION="FieldName='SegmentActiveCode' AND TextValue = '01'" POLICY="[Policy:PolicyGUID]">
<MathVariable VARIABLENAME="SegmentIndex" TYPE="LOOPINDEX" SOURCEARRAY="Segments" DATATYPE="INTEGER"></MathVariable>
<MathVariable VARIABLENAME="SegmentGUID" TYPE="SEGMENTFIELD" SOURCEARRAY="Segments" DATATYPE="TEXT">SegmentGUID</MathVariable>
<MathIF IF="SegmentIndex=0">
<MathVariable VARIABLENAME="SegmentModalPremiumAmt" TYPE="COLLECTION" OPERATION="CREATE" DATATYPE="MAP"></MathVariable>
<MathVariable VARIABLENAME="SegmentNextYearsModalPremiumAmt" TYPE="COLLECTION" OPERATION="CREATE" DATATYPE="MAP"></MathVariable>
</MathIF>
<MathVariable VARIABLENAME="TypeCode" TYPE="SEGMENTFIELD" SOURCEARRAY="Segments" DATATYPE="TEXT">TypeCode</MathVariable>
</MathLoop>
</MathIF>

MathIF Example Not In ScreenMath

<MathIF IF="TypeCode='04'">
<MathVariable VARIABLENAME="InitialFace" TYPE="OBJECTFIELD" OBJECTNAME="Segment" SOURCEOBJECT="Segment" DATATYPE="DECIMAL">SegmentInitCovAmt</MathVariable>
<MathVariable VARIABLENAME="BaseAnnualPrem" TYPE="OBJECTFIELD" OBJECTNAME="Segment" SOURCEOBJECT="Segment" DATATYPE="DECIMAL">SegmentAnnualPremium</MathVariable>
<MathVariable VARIABLENAME="BaseModalPrem" TYPE="OBJECTFIELD" OBJECTNAME="Segment" SOURCEOBJECT="Segment" DATATYPE="DECIMAL">SegmentModalPremium</MathVariable>
<MathVariable VARIABLENAME="NextYearBaseAnnualPrem" TYPE="OBJECTFIELD" OBJECTNAME="Segment" SOURCEOBJECT="Segment" DATATYPE="DECIMAL">SegmentNextYearsAnnualPremium</MathVariable>
<MathVariable VARIABLENAME="NextYearBaseModalPrem" TYPE="OBJECTFIELD" OBJECTNAME="Segment" SOURCEOBJECT="Segment" DATATYPE="DECIMAL">SegmentNextYearsModalPremium</MathVariable>
</MathIF>

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