Validation

Validating data is an extremely important aspect of developing a business application. While there are several built-in means of validating data, such as setting a field as "Mandatory", or the data type of the field, you can also implement more advanced validation by using scripting.

In the Change event for the form, in an action script or a workflow stage script, you can perform checks in scripting to make sure that fields are within proper boundaries.

For example, if you were checking that a field value called Age was over 18, you could enter this script: 

if #input/Age <= 18 then
    error "You must be at least 18 to perform this action."
end if

The expression entered between the "if" and "then" is the condition you're checking, and the text after the error statement is the error that will be displayed to the user.

If you don't want to stop execution with an error, and instead want to just warn the user, you can use the "warning" keyword instead of "error". This will display a message to the user, but let them ignore it and continue committing the transaction. 


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM