Set error properties for a control
You can set the validity and error message for the following controls using form actions to display invalid fields at runtime.
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).
- Open a form.
- Add controls to the form, such as a Textbox or Checkbox.
Configure an action for the control, such as Business rule. See
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.When you call the action on a button that validates the form field, we recommend you to select the Causes validation property. 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 validationis selected on the button. But, if there are any invalid fields on the form, clear the Causes validation property 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.