Set error properties for a control

You can set the validity and error message of the following controls using form actions to display invalid fields at runtime.

  • Text Box

  • Drop-Down List

  • Calendar

  • Check Box

When you configure an action on these touch and non-touch controls and drill into the properties, the ISValid and ErrorMessage properties are available. The ErrorMessage accepts a string (default: Empty) value and IsValid accepts a boolean (default: True).

  1. Open a form.
  2. Add controls to the form, such as a Text Box or Check Box.
  3. Configure an action for the control, such as Business Rule. See Add actions to a form or control.

    When you call a business rule action on a form control and map the output of the business rule to the IsValid and ErrorMessage properties of the form field, at runtime, the business rule determines if the field value is valid. If IsValid = false, the field is highlighted as invalid and the message that is set in the ErrorMessage property is displayed when you move the pointer over the control.

    Note When you call the action on a button that validates the form field, we recommend you to set the Causes Validation property to No. For example, if an action will set the IsValid / ErrorMessage properties of a text box, then that action can only execute if there are no valid fields on the form when Causes Validation is set to Yes on the button. But, if there are any invalid fields on the form, set the Causes Validation property to No, on the button the action is associated with.

    The ErrorMessage defined while configuring an action for the control takes precedence over the ErrorMessage defined while configuring the properties of a control.