OnChange

Oracle Insurance Logo

The OnChange property selection is used to set-up Fields with content that may change. OnChange configuration can be used in Business Rules that contain entry Fields such as Screens, Segments or Transactions. The current Field you are configuring is called the trigger field. Changing the trigger field changes the values of another Field(s).

In Rules Palette, the OnChange property is available via the FieldProperties window. The OnChange button opens the OnChange configuration window. The OnChange configuration window populates with the pre-fixed Field Name, which must be used when writing OnChange statements. When writing a statement that is called an Expression or pulling the value of the trigger field, you must prefix the beginning of the Field name with the DataType. OnChange supports the Combo Box, Compare or Radio data type. The fields in the OnChange configuration box will vary accordingly.

Note: The OnLoad checkbox is available via the FieldProperties window only after an OnChange has been set-up. The OnLoad lets the system know that this Field affects other Fields on the page and will execute an OnChange command. When the Screen or Transaction is initially displayed, the OnChange will be triggered by the OnLoad functionality. If the OnLoad box is not checked, the OnChange command will not be performed when the Screen/ Transaction initially loads. The OnLoad checkbox is normally used in conjunction with the creation of a Field that performs an OnChange; however, there are situations where the OnLoad checkbox is not needed because the user needs to make a selection before loading data into another field.

To create a Combo or Radio Field using OnChange

First you will add, index and name Items that store what will occur when the various options listed for the trigger field are selected. When you create an Item, you are selecting from the Index box the index number of the trigger field option you want to associate your Item to. Index numbers are associated with the positioning in a combo box or radio button, starting with 0, not the associated code value. Naming the Item can be done to help associate an Item with the options in the trigger field, but the Index number is what makes the connection. The asterisk * is used as a default for when the user selects an option that does not have a specified Item associated with it. Remember indexing starts at 0 for the trigger field.

Steps to Create Items

  1. Select Create New (make sure Create New is Highlighted).

  2. Using the Index drop-down box select either * or 0 to begin.

  3. Select the ADD button and your item is added under Create New.

After you create your Items, you will need to write the Expressions that execute what will happen when the user selects an option in the trigger field. Please see Expression and Condition Writing.

  1. Highlight an Item under Create New.

  2. Select whether the Item will be Calculated or a TypeCode.

  • If you select Calculated, you will perform a calculation to fill the Field. You can use a SQL statement to populate the field using the Calculated. You can select Type of either:

    • EVAL &endash; Should be used when the desired affect is to enable, disable, or change the formatting of a field.

    • RELOAD &endash; Should be used with a SQL statement.

Compare OnChange

OnChange Compares are used to perform operations depending on whether the Field condition is true, false or blank.

Steps to Create a Compare

  1. Select Compare from the Type drop-down box.

  2. Type in your conditional Expression. Expressions use the Form name, the prefixed field name and JavaScript operators for condition writing. Please see Expressions and Condition Writing.

  3. Type in your Expression that performs a function. Please see Expressions and Condition Writing when filling out the IfTrue, IfFalse or IfBlank Expression box.