Setting Up Field Validation

You set up field validation rules on the Fields - Integrity page. You can choose from six different validation types, or methods. The Integrity page is really six pages in one. When you select a validation type on the Type combo box, the Integrity page changes to let you enter the information that validation type requires.

Overview

When you first select the Integrity page for a field, the Integrity page looks like this:

Initially, the validation Type is set to Not Empty/Null (explained below) and validation is turned off.

·       Validation Type: You choose the validation type, or method, you want to use for a field in the Type combo box. 

·       Validation Option: You turn validation for a field on and off in the Option combo box.  

The following is an overview of how to set up validation for a field.

Ø To set up validation for a field - overview

1.   Type:  Click the validation Type combo box. The combo box displays the following list of validation types, or methods:

·       Range

·       Set

·       Referential

·       Same As

·       Code

·       Not Empty/Null

   Click the validation type you want to use for the field. VPM Enterprise changes the Integrity page to let you enter the information the validation type you selected needs. Enter the validation information required.

Details Follow: The Range, Set, Same As, Code and Not Empty/Null validation types are explained in detail in the following sections. The Referential validation type is explained in detail in the section Referential Validation.

2.   Option: Click the validation Option combo box and select the validation option you want. The combo box displays the following list of validation options, which have the meanings shown:

·       Off: No validation performed on the field.

·       On: Validation is performed on the field. A null value, or no entry, is not acceptable unless a null value is a valid entry under the validation rules entered for the field.

·       On/Empty/Null: Validation is performed on the field. A null value, or no entry, is acceptable.

3.   Override: Checking the Override check box allows a user to override a field’s validation and force an invalid entry into the field. If a user can override field validation, a dialog appears asking whether the user wants to override when the user enters invalid data into the field on a form.

4.   Level: Click the validation Level combo box and select the validation level you want. The combo box displays the following list of validation levels, which have the meanings shown:

·       Field: Field validation is run only when the focus moves from the field on a form, not when a record is saved.

·       Record: Field validation is run only when a record is saved, not when the focus moves from the field.

·       Field/Record: Field validation is run both when the focus moves from the field on a form and when a record is saved.

5.   Enter Validation Info: After you have selected the field’s validation type, enter the information the validation type requires.

Tip: Be sure you have selected the field’s validation Option and Level. Check whether you want to allow a user to Override the field’s validation. Integrity setup is then complete.

6.   PostValidation Code: After a field passes validation, any PostValidation code you have entered for the field is run. You can use your PostValidation code to apply additional validation rules to the field or to update or calculate other fields using the new field value. See Field-Level Data-Driven Developer Code.

You will find descriptions of the validation types in the following sections of this chapter.

Picklist Help: Many fields on the Integrity page have picklist help. This means that instead of typing your entry, you can display a picklist of valid entries by pressing F2 or by clicking your right mouse button and selecting Picklist on the shortcut menu. Select the entry you want on the picklist and double-click the entry or press Enter. If a field does not have picklist help, you’ll see a “Help not available” message when you try to activate the picklist.

More:

Range Validation