Skip to main content

Assign reference keys to tables

Data-model setup · Optional step

Add a reference key only when a table needs an additional stable, unique value for a lookup or relationship.

A reference key is an extra identifier on a data table. Unlike the one primary key that identifies the table’s main record identity, a table can have multiple reference keys. NIM can use them for relationships and Vault queries when the primary key is not the value you need to look up.

For the difference between primary and reference keys, see Keys.

When to add a reference keyDirect link to When to add a reference key

Add a reference key when all of these are true:

  • The table already has an appropriate primary key.
  • You need to reliably look up records by a second identifier.
  • The second identifier is unique, populated, stable, and consistently formatted.
  • A filter, relation, integration requirement, or Vault query needs that specific value.
Good useUsually not a good use
An alternate immutable external ID used by another systemA display name used only for readability
A unique legacy ID required for a controlled lookupAn email address that can change during account updates
A unique code consistently present in every relevant recordA department, title, or location value shared by many people
Do not key every useful columnA reference key is for dependable alternate identity, not a general tag. If a value is not unique and stable, collect it as a normal column and use a filter or relation appropriate to its data.

Assign a reference key in NIMDirect link to Assign a reference key in NIM

  1. Expand the system’s table list.
  2. Open the table that contains the alternate identifier.
  3. Select the Columns tab.
  4. Mark the selected column as Reference.
  5. Select Save.
  6. Repeat only for other tables or identifiers that need an alternate lookup key.

Validate before useDirect link to Validate before use

  1. Collect and load the system.
  2. Inspect sample records to confirm the reference value is present and unique where expected.
  3. Check its format against the value that filters, relations, or Vault queries will provide.
  4. Test the dependent workflow using representative records, including a no-match case.
warning

Do not mark a column as a reference key if duplicate or blank values are expected. Use a normal collected column and choose a different matching approach instead.

Next stepsDirect link to Next steps

Continue with Specify intra-system relations when the key connects tables in the same system. For an alternate-record lookup in a calculated field, see Vault queries.