ActionEvents
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.
Note: Fixed fields can be accessed from Events and Actions on the following screens:
Agreement
ClientScreen
ClientRelationshipScreen
ClassDetailScreen
ClassGroupScreen
- GroupCustomerEnrollmentScreen
Note: If the ACTIONTYPE attribute is set to “DISABLEALL” within an ONCHANGE event, it is possible that a change to one field may unintentionally disable the entire screen. To avoid this situation, avoid configuring ONCHANGE events using the DISABLEALL value for the ACTIONTYPE attribute.
Element/Tag | Attributes | Definition |
---|---|---|
<Events> |
|
The opening and closing tag for the element. |
<Event> |
|
Repeatable: Identifies the event that is being defined. |
TYPE |
ONLOAD ONCHANGE ONSUBMIT CALLEDEVENT: this is used to call an eventconfigured outside the transaction, in a business rule associated with the transaction. This value may be used in TransactionAllocationScreen business rule and MultiFields business rule configuration. Please refer to the prototype configuration example available in the Rules Palette Help for details of how and when this can be used. Note: In the event that a MultiFields CALLEDEVENT and a TransactionAllocationScreen CALLEDEVENT are given the same ID, the MultiFields event will execute first. |
|
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. ActivitySuspenseNumber literal value in addition to existing values |
|
ID |
The unique ID for the event being invoked by the transaction. The ID value should match the ID in the CALLEXTERNALEVENT definition in the transaction XML. |
|
<ScreenMath> |
|
Opening and closing tags for Event Math section. |
<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>. ActivitySuspenseNumber literal value in addition to existing values |
|
<MathVariables> |
|
|
<MathVariable> |
|
The SUSPENSEFIELD math variable type supports the retrieval of suspense field data in screen and transaction math configuration |
TYPE |
SUSPENSEFIELD VALUE |
|
<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>. |
|
FIELD |
The field name that will be changed by the output of the ActionSet. ActivitySuspenseNumber literal value in addition to existing values |
|
<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. |
|
<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. |
|
VALUE |
String |
|
<Action> |
|
Defines whether to fill combo box with SQL query, or use fixed options. |
ACTIONTYPE |
String: SQL query string. SQL QUERY MATHCOLLECTION: References a screen math variable containing a collection. If this value is used, the value of the <Action> element should be a COLLECTION math variable defined in screen math. The following action types are the only ones available to Events in multifields: HIDE SHOW DISABLE DISABLEALL: Disables all fields, both dynamic and fixed, including multifields within a configuration section. This can only be used with the ONLOAD event type. If used with ONSUBMIT or ONCHANGE it will be ignored. ENABLE ASSIGN CALLEXTERNALEVENT: This value is used to invoke an event that is configured outside the transaction in a business rule associated with the transaction. Currently this feature is available in the TransactionAllocationScreen BR and MultiFields BR. Please refer to the prototype configuration example available in Rules Palette guide for details of how and when this can be used. |
|
FIELD |
The field name where the action is to occur. When used with MULTIFIELD this indicates which field within the multifield will be impacted. If INDEX is not indicated all instances of that field within the multifield will be updated. |
|
INDEX |
Used with MULTIFIELD. Indicates the position/row of the field the Action is to occur on (starts at 0). If INDEX is used only the field for that index will be impacted. |
|
MULTIFIELD |
The multifield name where the action is to occur. If only the MultiField is referenced then the event occurs on the entire section. |
|
ID |
To be used in conjunction with CALLEXTERNALEVENT. The ID value should match the ID in the CALLEDEVENT definition in the MultiFields BR/TransactionAllocation BR. |
|
<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 |
|
VALUE |
String. |
|
<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. Optional element value: String: Message to be displayed if ACTIONTYPE is ERROR or WARNING, and the IF condition is met. |
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 the FIELD attribute is used in <Action> element with ACTIONTYPE='ERROR', then an error/warning message will appear inline under the Field that was referenced as well as in the Validation section at the top of the screen. Note: The value of a Math Variable or a Segment Field can be substituted in the error message surrounded by $$$. See General Structure and Best Practices. |
|
|
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 the FIELD attribute is used in <Action> element with ACTIONTYPE='ERROR', then an error/warning message will appear inline under the Field that was referenced as well as in the Validation section at the top of the screen. Note: The value of a Math Variable or a Segment Field can be substituted in the warning message surrounded by $$$. See General Structure and Best Practices. |
|
|
SHOW Will make hidden field visible. |
|
|
HIDE Will hide a visible field. |
|
|
ENABLE Allows data entry in an editable field. |
|
|
DISABLE Prohibits data entry in an editable field, and changes the background color. |
|
|
DISABLEALL Prohibits data entry in all editable fields and multifields within a configuration section. Note: The DISABLEALL option is available for the following screens:
|
|
|
ENABLEALL Allows data entry in all editable fields and MultiFields within a configuration sector, except for those fields with the <Disabled> tag set to "Yes". DISABLEALL Prohibits data entry in all editable fields and MultiFields within a configuration sector. Note: The ENABLEALL and DISABLEALL options are available for the following screens:
|
|
|
READONLY Prohibits data entry in a field 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. |
<Else> |
TYPE |
Same as defined above. |
XML Example Without Multifield Events
<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 <= 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 > 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 of $$$ReplacementType$$$ must be chosen.</Action>
</Condition>
</ActionSet>
</Actions>
XML Example With MultiField Events
<Transaction>
<EffectiveDate STATUS="Enabled" TYPE="SYSTEM"></EffectiveDate>
<MultiFields RULE="MultiField-SGMultiFieldPrototype">Yes</MultiFields>
<Fields>
<Field>
<Name>TestField</Name>
<Display>Non-MultiValue Field Test</Display>
<DataType>Text</DataType>
</Field>
<Field>
<Name>TransactionField</Name>
<Display>TransactionField</Display>
<DataType>Text</DataType>
</Field>
</Fields>
<ScreenMath>
<Math ID="GlobalScreenMath" GLOBAL="Yes">
<MathVariables>
<MathVariable VARIABLENAME="ValueFromScreenMath" TYPE="VALUE" DATATYPE="TEXT">ScreenMath</MathVariable>
</MathVariables>
</Math>
</ScreenMath>
<Events>
<Event TYPE="ONCHANGE" FIELD="TestField">
<ActionSet ID="TestChangeExternalAction"></ActionSet>
</Event>
<Event TYPE="ONCHANGE" FIELD="TestField">
<ActionSet ID="TestChangeInternalAction"></ActionSet>
</Event>
<Event TYPE="ONLOAD">
<ActionSet ID="OnLoadExternalAction"></ActionSet>
</Event>
<Event TYPE="ONCHANGE" FIELD="EffectiveDate"> <ActionSet ID="ActionOnChange"/> </Event>
</Events>
<Actions>
<ActionSet ID="OnLoadExternalAction">
<Action ACTIONTYPE="ASSIGN" FIELD="TransactionField">'OnLoadValue'</Action>
<Action ACTIONTYPE="ASSIGN" MULTIFIELD="TextTestMF" FIELD="TextTest2" INDEX="1">'ValueFromTransaction'</Action>
</ActionSet>
<ActionSet ID="TestChangeExternalAction">
<Condition IF="Not IsEmpty(TestField) And TestField='HideCombo'">
<Action ACTIONTYPE="HIDE" MULTIFIELD="ComboTestMF"></Action>
</Condition>
<Condition IF="Not IsEmpty(TestField) And TestField='ShowCombo'">
<Action ACTIONTYPE="SHOW" MULTIFIELD="ComboTestMF"></Action>
</Condition>
</ActionSet>
<ActionSet ID="TestChangeInternalAction">
<Condition IF="Not IsEmpty(TestField) And TestField='HideTransactionField'">
<Action ACTIONTYPE="HIDE" FIELD="TransactionField"></Action>
</Condition>
</ActionSet>
<ActionSet ID="ActionOnChange">
<!--The MultiFields BR - MultiField-SGMultiFieldPrototype - will contain an Event of type CALLEDEVENT with ID = ”MFEvent” -->
<Action ACTIONTYPE="CALLEXTERNALEVENT" ID="MFEvent"></Action>
</ActionSet>
</Actions>
<Math>
<MathVariables>
<MathVariable VARIABLENAME="One" TYPE="VALUE" DATATYPE="TEXT">One</MathVariable>
</MathVariables>
</Math>
</Transaction>
XML Example With ACTIONTYPE="MATHCOLLECTION"
<Fields>
<Field>
<Name>QuerySetTrigger</Name>
<Display>QuerySet Trigger</Display>
<DataType>Check</DataType>
</Field>
<Field>
<Name>OptionTextField</Name>
<Display>Option Text</Display>
<DataType>Combo</DataType>
<Query TYPE="SQL">SELECT CodeValue, ShortDescription FROM AsCode WHERE CodeName = 'AsCodeDisbursementStatus' ORDER BY CodeValue ASC</Query>
</Field>
</Fields>
<Events>
<Event TYPE="ONCHANGE" FIELD="QuerySetTrigger">
<QuerySet ID="QuerySetAction" FIELD="OptionTextField">
</QuerySet>
</Event>
</Events>
<ScreenMath>
<Math ID="ScreenMath" GLOBAL="Yes">
<MathVariables>
<MathVariable VARIABLENAME="Collection1" TYPE="COLLECTION" ORDERED="Yes" DATATYPE="MAP">SELECT CodeValue, ShortDescription FROM AsCode WHERE CodeName = AsCodeStatus</MathVariable>
<MathVariable VARIABLENAME="Collection2" TYPE="COLLECTION" ORDERED="Yes" DATATYPE="MAP">SELECT CodeValue, ShortDescription FROM AsCode WHERE CodeName = AsCodeDisbursementStatus</MathVariable>
</MathVariables>
</Math>
</ScreenMath>
<Actions>
<QuerySet ID="QuerySetAction">
<Condition IF="QuerySetTrigger = 'CHECKED'">
<Action ACTIONTYPE="MATHCOLLECTION">ScreenMath:Collection1</Action>
<ElseIf IF="QuerySetTrigger = 'UNCHECKED'">
<Action ACTIONTYPE="MATHCOLLECTION">ScreenMath:Collection1</Action>
</ElseIf>
</Condition>
</QuerySet>
</Actions>
XML Example of a MultiFields BR to explain CALLEDEVENT configuration
<MultiFields> <MultiField> <Name>AddressMultifield</Name> <Title>Address Information</Title> <Start>1</Start> <End>3</End> <Fields> <Field> <Name>AddressGUID</Name> <Display>AddressGUID</Display> <DataType>Text</DataType> </Field> </Fields> <Events> <Event TYPE="CALLEDEVENT" ID="MFEvent"> <ScreenMath ID="ScreenMath"/> <ActionSet ID="MFActionOnChange"/> </Event> </Events> <ScreenMath> <Math ID="ScreenMath" GLOBAL="No"> <MathVariables> <MathVariable VARIABLENAME="RoleGUIDMV" TYPE="MULTIFIELD" INDEX="MultiValueFieldIndex" DATATYPE="TEXT">RoleGUID</MathVariable> <MathVariable VARIABLENAME="AddressGUIDMV" TYPE="SQL" DATATYPE="TEXT">SELECT * FROM TABLE(PKG_INQUIRY_SCREEN.fncEftRoles('[RoleGUIDMV]', '[EffectiveDate]'))</MathVariable> </MathVariables> </Math> </ScreenMath> <Actions> <ActionSet ID="MFActionOnChange"> <Action ACTIONTYPE="ASSIGN" MULTIFIELD="AddressGUID">AddressGUIDMV</Action> </ActionSet> </Actions> </MultiField> </MultiFields>