Validating string values

The Regular Expression check searches for text strings listed for each string field in a feature class or table. String fields use alphanumeric strings as their values. They include fields that contain the feature's name, measurements (height, length, width, and area), z-values, and metadata such as a feature's creation date.

Learn more about metacharacters used to build regular expressions

When a string is found that does not match the format specified, the table row is returned as a check result. For example, if you want to find records that have the incorrect Social Security Number format, you could type "\b[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]\b" in the SSN field. The check returns records that have values such as 123456789, 123-ab-4567, 1123-34-12345, and 123-4567.

When you are searching multiple fields, they run independent of each other. For example, if you have a User field and a Date field and only one matches your expression, the feature is returned once. If neither of them match your expression, the feature is returned twice, which can result in duplicate records.

Learn more about avoiding duplicate records in the Reviewer table

You can also find null values using this check. If the Return Null Values check box is checked, null values are included as part of the check's results. You can ignore null values by unchecking the check box.

The Regular Expression check can be run on an entire feature class, a subtype, or a set of features selected using an SQL query.

Once you have defined the criteria for the check, you can configure the notes and a severity rating. The notes allow you to provide a more specific description for the feature that has been written to the Reviewer table and are copied to the Notes field in the Reviewer table. The severity rating allows you to indicate how important the results from a check are in terms of your quality assurance/quality control processes. The lower the number, the greater the priority the check's results have.

Steps:
  1. Start ArcMap.
  2. On the main menu, click Customize > Toolbars > Data Reviewer.
  3. Click the Select Data Check drop-down arrow on the Data Reviewer toolbar, click the plus sign (+) next to Table Checks, then click Regular Expression Check.

    The Regular Expression Check Properties dialog box appears.

    Regular Expression Check Properties dialog box
  4. If necessary, type a unique name for the check in the Check Title text box.
    NoteNote:

    The check title can be used to describe the conditions you are looking for with the check. This is useful when you have multiple instances of the same check to validate the same feature classes or tables but with different validation parameters.

  5. Click the Feature Class/Subtype drop-down arrow to choose the feature class and subtype on which to run the check.

    This is the feature class whose values you are going to search. The names of the string fields appear in the Regular Expression Editor area.

  6. To run the check on the entire feature class and save this setting, check the Always Run on Full Database check box.
  7. To run the check on specific features in a feature class, click SQL to construct an SQL query.
  8. Type a string or regular expression to search for in the Regular Expression cell for the string field you want to use.
    NoteNote:

    The text string is case sensitive. If you use lowercase letters when the field value is all capital letters or a mixture, the results of the check will be inaccurate. The check uses the ATL regular expression engine, so some of the metacharacters have a different meaning in ATL regular expressions.

    Learn more about metacharacters used to build regular expressions

    For example, if you are searching for all operators except yourself, you would type your name as the regular expression for the Operator field. To find features that have a particular date format, you would define the format for the date using a regular expression.

    TipTip:

    You can click Clear Regular Expressions to clear the contents of the Regular Expression column.

  9. Repeat step 8 as needed.
  10. If you do not want null values included as part of the results, uncheck the Return Null Values check box.

    This check box is checked by default.

  11. If necessary, type descriptive text for the check results in the Notes text box in the Reviewer Remarks area.
  12. If necessary, click the Severity drop-down arrow and choose a value that indicates the priority of the check's results in the Reviewer Remarks area.

    The severity indicates the importance of the check result. The values range from 1 to 5, with 1 being the highest priority and 5 being the lowest.

  13. Click OK.
  14. Click the Run Data Check button Run Data Check on the Data Reviewer toolbar.

    The Features to Validate dialog box appears.

    Features to Validate dialog box
  15. Choose an option in the Features to Validate area.
    • Selection Set—The check is run on the features that are currently selected in the map.
    • Current Extent—The check is run on the current map extent, which is controlled by the map scale.
    • Definition Query—The check is run on the features that are displayed based on definition queries that have been created for the feature class.
    • Full Database—The check is run on all the features in the feature class.
  16. To run the check only on features that have been edited in a versioned workspace, check the Changed Features Only check box.
    NoteNote:

    The Changed Features Only option is available only for a versioned database.

  17. Click OK.

    The check is run on the extent specified on the Features to Validate dialog box.

    When the check finishes, a check results dialog box appears.

  18. Do one of the following:
    • If you want to browse the results in the Browse Features window, choose the Browse Results option.
    • If you have started a Reviewer session and want to record the results in the Reviewer table, choose the Write to Reviewer Table option.
  19. Click OK.

Related Topics


4/19/2012