Skip to main content

General settings

Validation of elements

The validation of user inputs is a key element to avoid errors during data input. Users benefit as validation messages will tell them how to change their input to fix wrong values but also ensures that the data can be processed in all following steps.

For this reason, a number of UI elements like FormField, FormFile, FormTable and others provide the "validation" attribute. By using the supported syntax, you do have multiple possibilities to validate the user input.

General

By default there are three main ways to validate the user input:

  • SCRIPT: Validation via a custom JS script
  • OBJECT: Validation via en .NET workflow extension implementing the IValueProvider return true/false or 1/0.
  • SQL: Validation via a SQL statement returning true/false or 1/0.

Examples

  
<!-- using a script to check if a value is set -->
<FormField ... validation="SCRIPT[IG.hasValue('ISDEFAULT')]" ... />

<!-- using a .NET worklfow extenion to check if the input is valid -->
<FormField ... validation="OBJECT[classname.methodname({SESSION.SELECTION})]" ... />

<!-- using a SQL statement to check if a value is set -->
<FormField ... validation="SQL[SELECT DECODE(COUNT(*),0,1,0) FROM PR_UNIT WHERE PR_ID={FORM.PR_ID}]" ... />