Validation Rules

Updating and maintaining validation rules is a core aspect of Geobank usage. The basis for data validation is the set of validation rules specified in the validation rules table.

The Validation Rules tool can be used to maintain validation rules and refresh the validation triggers and stored procedures after closure; accurately aligning to your data.

To open the Validation Rules tool, from the Configuration Manager,

  1. Select Metadata

  2. Double click Validation Rules.

Tables Requiring Validation

In the Tables Requiring Validation table, the Geobank data tables to which validation rules can be applied are listed by Table Name and Description.

You can select a table in the Table Name column, and a Validation Type in the table at the right to view the Validation Rules configured for the selected table.

Validation Types

The Validation Types table displays the validation types that can be applied to validation rules.

The table acts as a filter for the rules displayed for a selected table (in the Tables Requiring Validation table) in the Validation Rules table at the bottom of the page. For example: If you select a table at the left and select Depth Checks from the Validation Types, only the Depth Check rules for the selected table will be displayed. The All Rules option will apply no filter.

The following Validation Types are available:

Validation Type Code Description
Lookup Rules L Rules that validate a value against an approved lookup list or lookup category. The value must be selected from the permitted codes.
Range Checks R Rules that check whether a numeric or date value falls within configured minimum and/or maximum limits. Limits may be inclusive or exclusive.
Depth Checks D Rules that validate drilling-depth information, such as checking interval gaps, overlaps, zero-width intervals, or ensuring that a child interval does not exceed the total depth of thew parent hole.
No NULLs E Rules requiring a value to be present; the field must not be blank or NULL. This corresponds to a required-field validation.
FK Match Required K Rules requiring a foreign-key value to match an existing related record in the referenced parent table. This applies to relationship-based validation rather than an ordinary lookup list.
Validation Not Required X Identifies fields or rules that are excluded from validation. Validation is not required for the selected item.
All Rules A Includes all validation-rule categories without filtering by type.

 

Validation Rules

The Validation Rules table displays the available rules of any Validation Types selected for the Tables Requiring Validation selected.

Selecting the Active check box for a rule will apply it to the selected table. Other columns in the table, including the Validation Type, Range (Minimum and Maximum) and Depth Fields columns, display the details for each rule on the row. The Applies to Buffer check box, when selected will apply the validation rule to the buffer table.

To modify a rule in the Validation Rules table,

  1. Select the rule you want to edit.

  2. Click the Edit button in the table toolbar.

    The Validation Rules dialog will open, with the configuration details for the rule displayed.

You can use the fields in the dialog to make changes to the configuration of the rule. If an invalid value is entered, the application will display a warning icon and a tool tip displaying the issue:

  1. Click OK to save the changes to the rule, or,

  2. Click Cancel to return to the Validation Rule page without saving.

To add a new Validation Rule,

  1. Select the table for which you want to create the new rule from the Tables Requiring Validation table.

  2. Select All Rules from Validation Types table so that you can see all of the available rules for the selected table. This can help prevent making duplicate rules.

    Note: If you select another option, such as Lookup Rules, the new validation rule will default to that type (i.e. Lookup Rules). You can change this Validation Type in the Add dialog.
  3. Click the Add button in the Validation Rules table toolbar to open the dialog:

  4. Enter the required Validation Type for the rule, if required, or accept the default displayed.

  5. In the Field or Rule field, enter the name of the rule, or the field to which the rule applies.

  6. Enter a Validation Group for the rule in the field provided. This is a custom group, but is required for validation.

    Enter DEFAULT if you do not have a custom Validation Group.

  7. The Active check box is selected by default, to apply the rule you are creating to the selected table. You can deselect it to mark the rule as inactive.

  8. If the new rule is to apply to the corresponding Buffer table, select the Applies to Buffer check box.

  9. If the new rule is a Lookup or FK Match Required rule, enter the name of the relevant Lookup Category in the field provided (for example INSTANCE), or use the drop down to select it:

  10. If the new rule requires a range of values within which to fall, you can enter the Range: Minimum and Range: Maximum values in the fields provided.

  11. In the Depth Fields field, enter the names of the fields in the table which contain information on depth values - such as DEPTH. You can add multiple fields separated with a comma (and no space), for example DEPTH_FROM,DEPTH_TO.

  12. Click OK to save the new rule as configured, or,

  13. Click Cancel to exit the dialog without saving.

The new rule you created will be listed in the Validation Rules table and can be applied to the table you selected, or added to other tables using the name of the rule:

You can delete a validation rule by selecting it in the Validation Rules table and clicking the Delete button. A prompt will be displayed for confirmation:

Note: Deleting validation rules should only be performed by Geobank Administrators. Deleting standard validation rules is not recommended.