Creating Rules that Display Hint on Specifying Claim Amount Controls

You can create a rule that displays a hint to the user when specifying the Claim Amount or Third Party Amount controls.

Note: The hint displayed here will not be localizable. Localizing dynamically displayed hints is outside the scope of this tutorial.

Procedure

  1. Select the Claim Amount control on the Capture Claim form.
  2. Click the Rules property tab.
  3. Click the Add Rule button against the event type Enter (enter).
  4. In the New Rule wizard, Rule Details page, add following inputs on the Rule Details screen and click Next:
    • Name:
      show_rounding_hint
    • Label:
      Display hint on entering claim amount controls.
  5. In the Rule: Pick Events page, leave the Enter (enter) event type unchanged and click Next.
  6. Click the (plus) button in the Define Actions page.

    The Add Action to Rule page opens.

  7. Select options Create a new action and Script Action and click Next.
  8. Type the following values in the input fields:
    • Name:
      show_rounding_hint
    • Label:
      Display hint on entering.
  9. Type this script and click Finish:
       var hint = "The value will be rounded to nearest dollar";
       context.control.setHint(hint);
  10. In the Define Actions page, select Shared check box against the action.

    This will make the action shared.

  11. Click Finish.
  12. Edit the newly created rule and add an additional event by selecting the rule Display hint on entering claim amount controls in the Outline view, and then selecting the Events tab.
  13. Click the (plus) button and in the Select Event page select the event type Third Party Amount (ThirdPAmount), Update and click OK.

    This will make the rule to be invoked on specifying both the controls Claim Amountand Third Party Amount.

    Note: As a result, whenever you specify data for the controls Claim Amount and Third Party Amount, the hint will be displayed.

    The control Third Party Amount is visible only if the third party was involved in the accident, which is not the case in this tutorial. In the step Setting Visibility of Panes from the General Properties Tab we decided to make the Third Party Information pane invisible in case there is no third party involved in this accident.