IBM Datacap, Version 8.1            

Overriding validation failures

By default, all validations can be overridden, which means that the operator can submit a batch that contains validation errors by selecting to override them

Depending on the business requirements, overriding validation failures is appropriate. For example, if the validation error stems from a calculation error on the original page, the operator does not modify the field values. Instead, the operator must override the error and submit the batch. The application sends the batch to an exception handling task. When the operator overrides a validation error, Taskmaster sets the page status to 73 and the document status to 142.

In other situations, you can prevent the operator from overriding validation errors by using the SetIsOverrideable action.

Library Action Description
Validations SetIsOverrideable If set to False, specifies that if validation on the current object fails, the operator cannot override the error. If set to True, the operator can override the error.
For example, to prevent the operator from overriding an error in the Validate Car Type rule, you can insert SetIsOverrideable("False").
Validate Car Type
    Validation: Car Type
        SetIsOverrideable("False")
        OpenConnection("@APPVAR(*.lookupdb:cs)")
        ExecuteSQL(""SELECT Car_Type FROM Car_Types WHERE Car_Type='%s';",Car_Type")
        CloseConnection()

In this case, the operator must select a valid car type from a drop-down menu that DotEdit displays next to the field that failed validation.

If the operator attempts to submit a page that failed this validation, an error message is shown.



Feedback

Last updated: November 2013
dcadg362.htm

© Copyright IBM Corporation 2013.