You are here: Common Elements > ActionsEvents

Oracle® Insurance Rules Palette Release 9.3.1.0 E21044_01

# ActionEvents

## Description

ActionEvents provide the ability to perform actions on a field as an event occurs on the screen. Configuration establishes the important events and links them to action sets via ID attributes. When the system detects one of these events, it automatically executes the action set assigned to the event.

ActionEvents can be used to:

- create custom error and warning messages that appear to the end user after the system validates what was entered.

- change fields from enabled to disabled (and vice versa) when an event occurs.

- change fields from hidden to displayed (and vice versa) when an event occurs.

- change a field’s data according to the value in a trigger field.

## ActionEvents Elements/Attributes Table

Element/Tag | Definition | Attributes | Element/Attribute Value and Description
--- | --- | --- | ---
<Events> | The opening and closing tag for the element. |  |
<Event> | Repeatable; Identifies the event that is being defined. | TYPE | ONLOAD ONCHANGE ONSUBMT
FIELD | Any field name in the <Fields> section. Used with ONCHANGE to identify the trigger field, which when it changes, causes the actions to process.
<Math> | Call the <Math> that is defined in the <ScreenMath> section to be run whose name matches an ID. | ID | Any ID name given in the Math section under <ScreenMath>.
<ActionSet> | Call the <ActionSet> that is defined in the <Actions> section to be run whose name matches an ID. | ID | Any ID name given in the <Actions> section under <ActionSet>.
<QuerySet> | Call the <QuerySet> that is defined in the <Actions> section to be run whose name matches an ID. | ID | Any ID name given in the <Actions> under <QuerySet>.
FIELD | The field name that will be changed by the output of the QuerySet.
<ScreenMath> |  |  |
<Math> | Math section as defined in other rules. | ID | Any name (no spaces).
GLOBAL | Yes / No Identifies the math that will be considered the global math and will therefore be processed once on the load of the screen.
<MathVariables> | Existing standard math capabilities. |  |
<Actions> |  |  |
<QuerySet> | Defines QuerySet. | ID | Any name (no spaces).
<Condition> | Optional conditional logic. | IF | Any expression resulting in a true or false value. When the expression results in a true value, the system passes execution to the first statement contained by the opening and closing tags of the parent element. Statement execution continues serially to the next statements until the closing parent tag, an Else element or an ElseIf element is reached. When the expression results in a false value, the system passes execution control to an Else or ElseIf element or closing parent tag, whichever is closest. Functions and direct date comparisons are available for use in the expression. Screen math variables and fields are available for use in the expression.
<Action> | Defines whether to fill combo box with SQL or fix options. | ACTIONTYPE | SQLQUERY
OPTIONS
<Option> | Standard definition for fixed options for a combo box field. |  |
<OptionValue> | Standard definition. |  |
<OptionText> | Standard definition. |  |
<ElseIf> | ElseIf is executed when prior conditions in IF and ElseIf elements are not true. Use this element when there are further conditions to express in the condition structure. IF attribute must be included. Multiple ElseIf elements are possible within a condition structure. | IF | Any expression resulting in a true or false value. When the expression results in a true value, the system passes execution to the first statement contained by the opening and closing tags of the parent element. Statement execution continues serially to the next statements until the closing parent tag, an Else element or an ElseIf element is reached. When the expression results in a false value, the system passes execution control to an Else or ElseIf element or closing parent tag, whichever is closest. Functions and direct date comparisons are available for use in the expression. Screen math variables and fields are available for use in the expression.
<Else> | Else is executed when prior conditions in IF and ElseIf elements are not true. Use this element when there are no further conditions to express in the condition structure. Only one Else is possible within a condition structure. |  | Execution is passed to the first Action statement contained within the opening and closing <Else> element. Each statement is serially executed until the closing tag is reached.
<ActionSet> | Defines ActionSet | ID | Any name (no spaces).
<Condition> | Same as defined above. |  |
<Action> | Defines the type of action that is to occur. | FIELD | The field name where the action is to occur. This attribute is required when action type is equal to assign. It is also available when action type is equal to error or warning.
ACTIONTYPE | ERROR Provides a message to the user. The user cannot proceed until the all errors are fixed. All errors will display in one section of the screen (if more than one occurs). When FIELD is used, the error will appear under the field name as well as in the Validation section at the top of the screen.
WARNING Provides a warning message to the user. This is a warning to the user and the user may proceed even with the error messages. All errors will display in one section of the screen (if more than one occurs). When FIELD is used, the warning will appear under the field name as well as in the Validation section at the top of the screen.
SHOW Will make hidden field visible.
HIDE Will hide a visible field.
ENABLE Allows field entry.
DISABLE Does not allow field entry and changes background color.
READONLY Does not allow field entry and does not change background color.
ASSIGN Allows a value to be set to the field defined in the FIELD attribute. This action does not trigger an OnChange event on the receiving field.
<ElseIf> | Same as defined above. |  |
<Action> | Same as defined above. |  |
<Else> | Same as defined above. |  |
<Action> | Same as defined above. |  |

## XML Example

<Events>

<Event TYPE="ONLOAD">

<QuerySet ID="OnLoadQualType" FIELD="FundingMethod"></QuerySet>

</Event>

<Event TYPE="ONCHANGE" FIELD="FundingMethod">

<ActionSet ID="OnChangeFundingMethod"></ActionSet>

</Event>

<Event TYPE="ONSUBMIT">

<ActionSet ID="FinalValidation"></ActionSet>

</Event>

</Events>

<ScreenMath>

<Math ID="GlobalScreenMath" GLOBAL="Yes">

<MathVariables>

<MathVariable VARIABLENAME="NA" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable>

<MathVariable VARIABLENAME="NonQualified" TYPE="VALUE" DATATYPE="TEXT">13</MathVariable>

<MathVariable VARIABLENAME="Replacement" TYPE="VALUE" DATATYPE="TEXT">98</MathVariable>

</MathVariables>

</Math>

</ScreenMath>

<Actions>

<QuerySet ID="OnLoadQualType">

<Condition IF="QualType=GlobalScreenMath:NonQualified">

<Action ACTIONTYPE="SQLQUERY">SELECT AsCode.CodeValue, AsCode.ShortDescription FROM AsCode WHERE AsCode.CodeName = 'AsCodeMoneyType' AND AsCode.CodeValue IN ('00','01','50') ORDER BY AsCode.CodeValue</Action>

<Else>

<Action ACTIONTYPE="SQLQUERY">SELECT AsCode.CodeValue, AsCode.ShortDescription FROM AsCode WHERE AsCode.CodeName = 'AsCodeMoneyType' AND AsCode.CodeValue IN ('00','01','98') ORDER BY AsCode.CodeValue</Action>

</Else>

</Condition>

</QuerySet>

<ActionSet ID="OnChangeFundingMethod">

<Condition IF="FundingMethod=GlobalScreenMath:Replacement">

<Action ACTIONTYPE="ENABLE" FIELD="ReplacementType"></Action>

<Else>

<Action ACTIONTYPE="DISABLE" FIELD="ReplacementType"></Action>

<Action ACTIONTYPE="ASSIGN" FIELD="ReplacementType">GlobalScreenMath:NA</Action>

</Else>

</Condition>

</ActionSet>

<ActionSet ID="FinalValidation">

<Condition IF="IsEmpty(GrossAmount)">

<Action ACTIONTYPE="ERROR">Gross Amount is a required field.</Action>

<ElseIf IF="GrossAmount &lt;= 0">

<Action ACTIONTYPE="ERROR">Gross Amount must be greater than $0.00.</Action>

</ElseIf>

</Condition>

<Condition IF="IsEmpty(EffectiveDate)">

<Action ACTIONTYPE="ERROR">Effective Date is a required field.</Action>

<ElseIf IF="EffectiveDate &gt; SystemDate">

<Action ACTIONTYPE="ERROR">Effective Date cannot be in the future.</Action>

</ElseIf>

</Condition>

<Condition IF="ReplacementType=GlobalScreenMath:NA And FundingMethod=GlobalScreenMath:Replacement">

<Action ACTIONTYPE="ERROR">A Replacement Type must be chosen.</Action>

</Condition>

</ActionSet>

</Actions>

## Schema Example

(Example XML Pseudo Code)

<Transaction>

<!-- Configured fields -->

<Fields>

</Fields>

<!-- Events to invoke -->

<Events>

<Event TYPE="ONCHANGE" FIELD="EffectiveDate">

<Math ID ="Math100"/>

<QuerySet ID="Query100 FIELD=”MailCode"/>

<ActionSet ID="Action101"/>

</Event>

</Events>

<!-- Math that can be used for an Event -->

<ScreenMath>

<Math ID=”ScreenMath” GLOBAL=”Yes”> <!-- Identifying Global Math -->

<MathVariables>

<MathVariable VARIABLENAME="ExampleValue" TYPE="SQL" DATATYPE="TEXT"> SELECT AsActivityField>&ldots;</MathVariable>

</Math>

<!-- Local Math for a specific field -->

<Math ID="Math100">

<MathVariables>

<MathVariable VARIABLENAME="XYZ">&ldots;</MathVariable>

</MathVariables>

</Math>

</ScreenMath>

<<!-- Query Sets and Action Sets that define that action to be performed -->

<Actions>

<!-- Query Sets that changes field data-->

<QuerySet ID="Query100">

<Condition IF="Field != '01'">

<Action ACTIONTYPE="SQLQUERY">SELECT CodeValue &ldots;</Action>

<Else>

<Action ACTIONTYPE="OPTIONS">

<Option>

<OptionValue>01</OptionValue>

<OptionText>Mail</OptionText>

</Option>

<Option>

<OptionValue>02</OptionValue>

<OptionText>Hold</OptionText>

</Option>

</Action>

</Else>

</Condition>

</QuerySet>

<!-- Action Sets that control fields -->

<ActionSet ID="Action101">

<Condition IF="EffectiveDate == ''">

<Action ACTIONTYPE="WARNING" FIELD=” EffectiveDate”r;>Date Missing</Action>

</Condition>

</ActionSet>

</Actions>

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

Open table of contents