Monday 28 January 2019

Introducing Validation Expressions

With the increasingly complex requirements coming from business rules and logic, we have implemented an extremely flexible way to validate Events and Data fields being entered in TrakIT.

A new field called 'Validation Expression' has been added to Events and Data fields in workflows. 


This field allows you to write a custom expression to determine whether the value entered for the Event or Data field is valid. An example could be:

$ABC$=='' || $XYZ$==''?'Both ABC and XYZ are required':''

The above expression requires the fields ABC and XYZ to be populated before this field can be set. You can also use $VALUE$ to refer to the value being entered by the user (or @Value if the expression is SQL based)

As custom expressions can be very complex, we suggest you contact TrakIT Support to supply you with the relevant expression for the validation you need.

The Validation Expression field can accept both Javascript syntax expressions and full SQL query validation as well. The expression must return an empty value if the validation is passed or an appropriate error message if the validation fails.

Please contact TrakIT Support for any questions of queries.