XPAC Reference Guide

Data validation

Data validation

Previous topic Next topic  

Data validation

Previous topic Next topic  

The data validation tool helps you quickly verify database integrity, since manually locating errors in a large database can be very time-consuming. You can validate data across a:

whole database
range or group of fields
single field.

XPAC records the result of each rule that you create as PASSED or FAILED.

To create a data validation rule:

1.Select Tools > Data Validation Rules.

Note

If you accessed the data validation tool from a tab other than a database tab (for example, Main), the Select Database window displays, letting you select the database that you want to create a validation rule for. Otherwise, XPAC assumes that you want to create a validation rule for the database that you are currently viewing.

2.If required, select the database that you want to create a validation rule for:
a.In the Select Database window, select a database.
b.Click OK.
3.In the Data Validation Rules window, click New. XPAC creates a new rule.
4.Type a name for the validation rule.
5.Press Enter.
6.Specify the directory for the error report:
a.In the File to report error field, click Browse. A Windows Explorer window displays.
b.Navigate to the folder in which you want XPAC to save the error report.
c.Click Save. XPAC redisplays the Data Validation Rules window.
7.Select the rule that you previously created and click Edit. The Edit Data Validation Rule window displays.
8.Click Select Fields. The Data Field Selection window displays.
9.Select fields to add and remove as required from the Existing Fields and Fields to Insert lists.

Information

If required, deselect the Full row codes check box to only display field names.

10.Click OK. The Edit Data Validation Rule window redisplays.
11.Specify values in the Min and Max columns. Either:
a.Manually specify the values for each field:
i.Select the field
ii.Press F2.
iii.Type a value.
iv.Press Enter.
b.Automatically calculate the values for a field:
i.Right-click the field in the data sheet that you want to calculate values for.
ii.Select Populate Min Max Value.
c.Automatically calculate values for all fields in the data sheet by clicking Populate Min Max.
12.Select a database range in the Range drop-down list.
13.Type a name in the Range for Invalid Data field to create a new range containing values that fail validation.
14.Click OK.

To run a data validation rule:

1.Select Tools > Data Validation Rules.

Note

If you accessed the data validation tool from a tab other than a database tab (for example, Main), the Select Database window displays, letting you select the database that you want to run a validation rule for. Otherwise, XPAC assumes that you want to run a validation rule for the database that you are currently viewing.

2.If required, select the database that you want to run a validation rule for:
3.In the Select Database window, select a database.
4.Click OK.
5.In the Data Validation Rules window, select the rule that you want to run.
6.Click Run.

XPAC reports a PASSED or FAILED result for the validation rule. If validation fails, XPAC generates an error report and (if you specified a Range for Invalid Data), a new range containing the values that failed validation. If required, you can also view failed results in the Edit Data Validation Rule window by selecting the Show Failed Only check box.