Saved search gap and overlap check

This workspace script finds documents with gaps in Bates numbers or overlapping Bates numbers.

Special considerations

Consider the following when working with this script:

  • This script excludes Bates numbers that don't appear in the expected format (letters followed by numbers). For example, a Bates range of TEST1234.001-Test1234.009 would be skipped and excluded from the results.
  • It looks at the values in the Bates number fields instead of the Production Document File table.
  • The script may take a long time to run depending on the number of documents in the saved search.

Inputs

This script requires the following inputs:

Field Options Description
Saved search A list of all the saved searches that the current user has permission to run in the current workspace.

Select the saved search that contains the documents you want to check for gaps and overlaps in Bates numbers. The script only checks the records in the selected saved search.

Beginning Bates A list of all the fixed-length text fields on the Document object. Select the field that contains the beginning Bates value.
End Bates A list of all of the fixed-length text fields on the Document object. Select the field that contains the ending Bates value.

Outputs

After the script executes, the results appear as a list of duplicate Bates numbers and/or missing Bates numbers in the sequence.

The Results view includes the following fields:

  • Begin Range - the begin Bates number of the range that includes a gap or overlap.
  • Finish Range - the end Bates number of the range that includes a gap or overlap.
  • Type
    • Gap - indicates that there's a gap in the Bates numbers for documents included in the production.
    • Overlap - indicates that there are overlapping Bates numbers for the documents included in the production.
    • Invalid - indicates a NULL value for either the Beginning Bates field or the End Bates field.

Running the script

To add the script to your workspace:

  1. In a workspace, go to the Administration> Scripts tab.
  2. Click the New Relativity Script button.
  3. For script type, choose Select From Script Library.
  4. Click the ellipse icon (Ellipse icon) next to Scripts.
  5. Find and select the Saved Search Gap and Overlap Check script.
  6. Click Ok.
  7. Click Save.

For additional assistance, contact Relativity Support.