Develop > Tailoring > Data management > Data validation

Data validation

The validity table enables you to define a field’s valid values in a list of values, a list of ranges, a secondary file, and customized RAD subroutines. These values are then used for validating operator-entered data and for lookup processing (similar to Service Manager Find and Fill). These various validity definitions are consolidated in one file, resulting in easy maintenance. This can be of significant benefit when multiple forms access one database.

Validation routine

The value of a field is validated against a list of values (for example 10, 20, 30, or 40), a list of ranges (for example 50 through 60), a secondary file (similar to the Format Control secondary file query) and customized RAD subroutines. The fields within a file are validated in a particular order (for example fieldx, fielda, fieldg), in alphabetical sequence (for example fielda, fieldg, fieldx) or according to a field validation sequence number. The default processing of the validation routine validates the value of a field against the definitions in the validity table. If the current value of a field is invalid, a summary list of valid values and ranges is presented to the user. If no values or ranges are defined for the field, a list of records from the secondary file is presented. The user can then correct the invalid value and continue processing; return to the calling application; or force the application to accept the invalid value. The validity table also enables you to override this processing and execute customized RAD code.

User-defined processing statements

After determining that a field contains a valid value or range, user-defined processing statements are executed. Validity processing continues to the next field in the validity definition table until all specified fields are validated.

Each validity table definition contains four levels of definition:

  • Field Summary
  • Secondary File Query Information
  • Values Summary
  • Range Summary

Maintenance procedures

When it is necessary to differentiate the maintenance procedures of these different levels, the order of the documentation is Field level, Secondary Queries level, Values level, and Ranges level. For instance, the section on updating shows how to update Validation Records at the Field Level, the Value Level, and then the Range Level. All applications and procedures described refer to a unique maintenance application that specifically supports validity table maintenance. If you access any of the validity table databases with any other application (such as Database Manager), you must ensure that all data is properly structured in order for the validity definitions to work correctly at run time. Hewlett-Packard recommends that you always follow the documented Validity procedures.

Related concepts

Accessing the validity file
Deleting validity record components
Invalid application names
Invalid files and form names
Invalid field names
Printing validity definitions
Invoking validity table processing
Look-up processing

Related references

Validity validation rules