Populate Parent ID and Child ID

Note: You must have valid Relativity Community credentials in order to download any Community file linked to the documentation site. You'll need to enter those credentials on the Community login screen if you're not already logged in. If you're already logged in to the Community at the time you click a link, the file is automatically downloaded in the bottom left corner of your screen. If you get an error message stating "URL No Longer Exists" after clicking a Community link, it may be due to a single sign-on error related to the SAML Assertion Validator, and you should contact your IT department.

The Populate Parent ID and Child ID solution is a workspace-level script that populates a production Parent ID and Child ID on a document for a production set.

Note: This script will not honor document-level permissions. Workspace admin who have permissions to all documents will run this script.

Supported versions

This solution is supported in all Server versions and Relativity One.

You can find all versions of this solution on the Community via this Populate Parent ID and Child ID search string. You must be logged in to the Community for that string to return results.

Special considerations

Review the following considerations for this solution:

  • This script should only be run by a system admin. If you are not a system admin, we recommend you do not run this script.
  • Due to changes in the way productions are stored in Relativity, this script is not able to be installed at the Admin (Home) level. Instead it must be installed at the workspace level.
  • The script overwrites the values in the Parent and Child ID fields.
  • Changes made by the script can't be undone.
  • This solution doesn't support the client domains (multi-tenancy) and Data Grid features of Relativity.
  • The script takes longer to complete when the workspace contains a large number of groups.
  • Since the script framework has a default timeout of 20 minutes, we recommend limiting the number of documents to approximately 20,000 - 30,000.
  • As the script determines families based on the sort order the production was produced in, sort by families when producing productions if you plan on using this script.

Performance

Groups Documents Time
17K 20K 7:25
45K 50K 31:12
73K 100K 1:12:44

Note: The results of the script depend on the size of documents in the workspace. If you have issues with performance, we recommend splitting the documents into multiple production sets or contacting Relativity support.

Preparing the workspace

Before you can run the script, you must install the script at the workspace level and create two fields on the Document object to store the Parent ID and Child ID.

Installing the script

To deploy the solution, you first add it to the Application Library as a Relativity application. You can then install it from the Application Library to one or more workspaces.

Note: This script runs from the Admin level, you must install this application into a workspace for it to appear in the Script Library (at the instance level).

To add the solution to the Application Library:

  1. Log in to Relativity.
  2. Navigate to the Application Library tab.
  3. Click New Library Application.
  4. Either click Select File, or drag and drop the file into the Application.
  5. Navigate to and select the application file included in the solution, and then click Open.
  6. Click Save to upload the file to the Application Library.

To add the solution to a workspace:

  1. In the Workspaces Installed section, click Select to install the application to one or more workspaces.
  2. Select the workspace(s) where you want to install the application, and then click the Move selected left to right icon.
  3. Click Apply.
    The application is installed to the selected workspace(s). A list of workspace(s) where the application has been installed displays in the Workspaces Installed section.

Creating the fields

Before running the solution, you need to create a fixed-length text field to store the Parent ID and a long-text field to store the Child ID.

Complete the following steps to create fields for storing the data:

  1. Navigate to the Fields tabs.
  2. Click New Field.
  3. Select Document in the Object Type drop-down list.
  4. Enter a name for the Parent ID field in the Name field.
  5. Select Fixed-Length in the Field Type drop-down list.
  6. Select any other options that you want for the field. Click Save and Back.
  7. Repeat steps 2-6 for the Child ID field. Select Long-Text in the Field Type drop-down list.

Running the solution

After configuring the workspace, you can configure and run the solution by completing the following:

  1. In the workspace, navigate to the Scripts tabs.
  2. Click the name of the Populate Parent ID and Child ID script.
  3. In the Actions console, click Run script.
  4. Complete the following required fields:
    • Production - a required list of productions in the workspace.
    • Relational Field - a required, single-choice drop-down list that contains an alphabetical list of all Fixed-Length Text fields with relational set to “Yes” in the workspace.
    • Parent ID Field - a required, single-choice drop-down list that contains an alphabetical list of all Fixed-Length Text fields in the workspace. The script overwrites the values when it executes.
    • Child ID Field - a required, single-choice drop-down list that contains an alphabetical list of all Long-Text fields in the workspace. The script overwrites the values when it executes.
  5. Click Run.

Viewing the results

When the script executes, it updates the selected Parent ID and Child ID fields for all documents included in the production set data source. The OutputMessage section lists whether the script ran successfully, how many documents were updated, how long it took to run the script, and error messages.

If any of the following scenarios occur, the documents aren't updated and an error message displays in the OutputMessage section.

  • The production set includes one or more documents with the same Begin Bates number.
  • The Begin Bates or the End Bates number is null.
  • The Inclusion of Related Documents field is set to Yes and documents in a relational group exist outside the production set.

To view the results of the script, create a view on the Documents tab that contains the fields you selected for Relational, Parent ID, and Child ID.