Example: Defining a Foreign Key Relationship for Asset Status Field

This example explains how to configure a foreign key relationship for the Asset Status Field in the Configuration Item Group Leader.

The example assumes that the Asset Status Field is validated using the Status Field in the CI Status Lookup Table and uses CI Type as a constraint. By adding a foreign key relationship to the Asset Status Field, you ensure that values are correctly stored for the Field when it is used by Group Members.

Example: Defining the Foreign Key Relationship

To define a foreign key relationship for the Asset Status Field:

  1. Create a Blueprint.
  2. From the Object Manager, select the Configuration Item (CI) Group Leader, and then click Edit Group.
  3. Open the Status Field to the Validation/Auto-populate page.
  4. Select the Store foreign key check box.
  5. Click Create.

    The foreign key relationship that links Configuration Item to the Lookup Table CI Status is created.

  6. Click OK.

Example: Creating Unique Lookup Values

In some cases, duplicate values may exist in the Lookup Table used in your foreign key relationship. You must create a new table to store unique values that can be correctly referenced as foreign keys.

In this example, you will create a new Lookup Table to consolidate duplicate Status Field values in the CI Statuses Lookup Table.

To consolidate duplicate CI Status Field values:

  1. From the Object Manager, select Lookup Tables, and then select the CI Status Lookup Table.
  2. Select Edit Data.
  3. Make note of the duplicate values in the Status Field. In this example, you may see these values:
    • Active
    • Down
    • Expired
    • In Repair
    • In Stock
    • In Testing
    • New
    • Ordered
    • Planned
    • Etc.
  4. Close the Data Editor, and then create a new Lookup Table. For this example, use the name Status Value.
  5. Click OK.
  6. Add a Status Field to the new table, and then add the Status Field to the table's Default Form.
  7. Return to the Object Manager, and then open the Data Editor.
  8. Add a single value for each duplicate value found in step 4.
  9. Close the Data Editor.

Example: Setting Validation for the Foreign Key Relationship

After you create a Lookup Table that stores unique values for your foreign key relationship, you must enable validation on the Field used as part of the relationship.

In this example, you would set the Status Field in the CI Status Lookup Table to validate from the Status Field in the newly created Status Value Lookup Table.

The Field used in the foreign key relationship must also store foreign keys.