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

ScreenMath Element

The ScreenMath element may be used in screen business rule configuration to perform calculations, evaluate expressions and set variables.

ScreenMath Element/Attribute Table
Element/Tab Definition Attribute Element/Attribute Value and Description

<ScreenMath>

     

<Math>

 

 

Opening and closing tag for Math element.

 

 

 

ID

Text  

 

GLOBAL

Yes or No

<MathVariables>

 

 

 

<MathVariable>   

See MathVariable Element.

 

 

<MathIF>

See MathIF Element.

 

 

<MathLoop>

See MathLoop Element.

 

 

XML Example

<ScreenMath>
<Math ID="TimeCheckScreenMath" GLOBAL="No">
<MathVariables>
<MathVariable VARIABLENAME="PreCutoffTime" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable>
<MathVariable VARIABLENAME="PostCutoffTime" TYPE="VALUE" DATATYPE="TEXT">01</MathVariable>
<MathVariable VARIABLENAME="SystemCutoffTimeGMT" TYPE="SQL" DATATYPE="INTEGER">SELECT CutOffTimeCriteria.IntValue FROM AsMapGroup JOIN AsMapValue ON AsMapValue.MapGroupGUID = AsMapGroup.MapGroupGUID JOIN AsMapCriteria CutOffTimeCriteria ON CutOffTimeCriteria.MapValueGUID = AsMapValue.MapValueGUID AND CutOffTimeCriteria.MapCriteriaName = 'MinutesAfterMidnightCutOffTime' WHERE AsMapGroup.MapGroupDescription = 'CutOffTimeGMT'</MathVariable>
<MathVariable VARIABLENAME="CurrentTimeGMT" TYPE="SQL" DATATYPE="INTEGER">
<Oracle>SELECT to_char(cast((systimestamp AT TIME ZONE 'UTC') AS date),'HH24') * 60 + to_char(cast((systimestamp AT TIME ZONE 'UTC') AS date),'MI') FROM DUAL</Oracle>
<SqlServer>SELECT DATEPART(hh,GETUTCDATE()) * 60 + DATEPART(mi,GETUTCDATE())</SqlServer>
<DB2>SELECT HOUR(current timestamp) * 60 + MINUTE(current timestamp) FROM sysibm.sysdummy1</DB2>
</MathVariable>
</MathVariables>
</Math>
</ScreenMath>

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