Define Link Properties for a Relationship

Use the Links page in the Relationship Properties window (accessed from the Relationship Editor) to define how Business Objects in a Relationship are linked together. When you define link options, you determine how the underlying database tables for the Business Objects are joined.

The Relationship Properties window is available in the Relationship Editor (accessed from within a Blueprint in CSM Administrator).

To define link properties for a Relationship:

  1. Open the Relationship Properties window:
    1. In the CSM Administrator main window, click the Blueprints category, and then click the Create a New Blueprint task.

      If working on a saved Blueprint, open the existing Blueprint.

      The Blueprint Editor opens, showing the Object Manager in its Main Pane. The Object Manager lists the existing Business Objects.

    2. In the Object Manager, click a Business Object in the Object tree, and then click the Edit Relationships task in the Structure area.

      The Relationship Editor opens.

      You can also click the Edit Relationship button Relationship Icon on the Blueprint Editor Toolbar to open the Relationship Editor.

    3. Click Add to add a new Relationship, or Edit to edit an existing Relationship.
  2. Click the Links page.
  3. Define how to link the parent and child Business Objects:
    • Default Link, Storing Parent Key in Child Object: Select this radio button to have the child object hold the RecID of the parent object. This is the recommended option because it works for both one-to-one and one-to-many Relationships.

      Then, in the Default Link section, select or create a new Field (ex: Parent RecID) in the child object where the parent object's RecID will be stored.

    • Default Link, Storing Child Key in Parent Object: Select this radio button to have the parent object hold the RecID of the child object. This option is only available for one-to-one Relationships (the parent can only hold the ID of one child).

      Then, in the Default Link section, select or create a new Field (ex: Child RecID) in the parent object where the child object's RecID will be stored.

    • Use Join Table: Select this radio button to use a third database table to join the database tables that represent the parent and child objects. The join table will hold the IDs of both the parent and child objects. This is how many-to-many Relationships are linked (ex: Multiple Incidents can link to multiple Configuration Items).

      Then, define the type of join table to use:

      • Standard: Select this radio button to use the standard join table. All joins that use the standard join table will be stored in the same database table.
      • Custom: Select this radio button to use a custom join table. Then select an existing table, or create a new table that is used specifically for the Business Objects in the Relationship.

        To create a custom join table:

        1. Click New.

          The Create New Join Table window opens.

        2. Provide a name for the join table.
        3. Define custom join table fields:
          • Field with Parent ID: Provide the name of the Field in the join table that will hold the parent object's RecID (by default, ParentID is the name for this Field).
          • Field with Parent Type: Provide the name of the Field in the join table that will hold the parent object's type (ex: Incident, Customer, etc.). By default, Parent Type is the name for this Field.
          • Field with Child ID: Provide the name of the Field in the join table that will hold the child object's RecID (by default, ChildID is the name for this Field).
          • Field with Child Type: Provide the name of the Field in the join table that will hold the child object's type (ex: Journal, Approval, etc.). By default, Child Type is the name for this Field.
          • Field with Join Reason: Provide the name of the Field in the join table that will hold the join reason, if applicable (by default, Join Reason is the name for this Field).
          • Field with Child Join Reason: Select this check box to create a Field in the join table to hold the join reason for the reverse Relationship. Then, provide a name for the Field (by default, Child Join Reason is the name for this Field).
        4. Select OK.

          The custom join table is created with the defined Fields.

        Use a custom join table to:

        • Enhance performance. If you expect to join an extremely large number of records, having a custom join table allows the join to be stored separately, rather than in a standard table with all other joins.
        • Store additional information related to the join. For example, if you are linking an Incident to a Vendor, you can build the link through a work order.

        The join tables in the drop-down were created for other Relationships. If you select an existing table, this Relationship will share a database table with the other Relationships that use the selected table.

        • Acts as child in join table: Select this check box to store the parent object's type and ID in the child type and ID fields. For example, in an Incident Links Configuration Items Relationship, the reverse Relationship (Configuration Items Link Incident) would have Acts as child in join table selected, allowing both Relationships to use the same row in the database table.

      (Optional) Define a join reason. Join reasons allow you to provide brief information about why two objects are joined together.

      • Join Has Reason: Select this check box to enable join reasons for the table. The subsequent options are available only if this check box is selected.
      • Prompt User for Join Reason after Add/Link: Select this check box to prompt Users for a join reason when records are added or linked in a tab in a Form Arrangement.
      • Join Reason: Provide a reason for the join. This is displayed as the join reason column header in the Grid view of the Form Arrangement tab. The Grid can be filtered based on the join reason field.
      • Join Reason Prompt: Provide custom text to display in the Prompt window that asks Users for a join reason when records are added or linked in a tab in a Form Arrangement. If no custom text is provided, the join reason is used.
      • Provide List of Values: In the drop-downs, select a Business Object and Field to use as the join reason.
      • Auto-Populate Join Reason for Reverse Relationship: Select this check box to auto-populate the join reason for the reverse Relationship.

        This option is only available if Provide List of Values is selected and the standard join table is used. If a custom join table is used, it must have a Child Join Reason field with a ChildJoinReason attribute. When you create a new custom join table, you can select the option to create this Field with the appropriate attribute. If you use an existing custom join table, you might have to manually add the Field (including the attribute) to the join table (within a Blueprint).

        Select an option for auto-populating the join reason for the reverse Relationship, either:

        • From Field: Select this radio button to the use a value from a Field as the join reason for the reverse Relationship. Then, in the drop-down, select a Field from the Business Object selected in the Provide List of Values drop-down.
        • Use Same Join Reason for Reverse Relationship: Select this radio button to use the same join reason for the reverse Relationship as is used for the primary Relationship.
    • Set up custom link: Select this radio button to create custom criteria for linking the parent and child objects.
      • Use Constraints: Select this check box to define constraints that limit when a new child is added to the Relationship.
        1. Define constraints that limit when a new child is added to the Relationship:
          1. Select Add to add a constraint or filter.
          2. Select a field in the Business Object you are currently working with.
          3. Select an operator (example: Equals).
          4. Value: Select a value for the field. Applicable values include:
          5. Select OK.
          6. Add additional constraints as necessary.
      • Auto-populate: Select this check box to define fields and values that are auto-populated when a new child is added to the Relationship.
        1. Define a list of Fields and values that are auto-populated when a child is added to a Relationship:
          1. Click Add to add a Field that is auto-populated with a defined value.

            Click Edit to edit a selected auto-populated Field. Click Delete to remove a Field from the list of auto-populated Fields.

          2. Define a Field to auto-populate and the value to use to auto-populate the Field:
            • Field: In the drop-down, select a Field from the parent or child object.
            • Value: In the drop-down, select a value to use to auto-populate the Field. Applicable values include:
          3. Select OK.

  4. Select OK.

  5. Publish the Blueprint (File > Publish Blueprint) to commit the changes, or save the Blueprint (File > Save Blueprint) to continue making other changes.