Example of a back reference field for Rational ClearQuest.

Technote (FAQ)


Question

How can you create a back reference field in IBM® Rational® ClearQuest®?

Answer

A back reference field would be used to be able to not only see the child records of a parent record type, but also to be able to see the parent records that are associated to that child record type. For example, a back reference field would be used if a user would like to see which customers have experienced a specific defect and would also like to know all of the defects a certain customer has experienced.

  1. Log in to the Rational ClearQuest Designer and check out the schema.
  2. Create a field in the defect record type called "Related_customers". This is of type REFERENCE_LIST to the Customer record type.
  3. Next, add a back reference called "Related_defects". "Related_defects" will now be a read-only field that automatically gets created in the Customer stateless record type.
  4. Drag the "Related_customers" field onto the Defect record type form. This will create a list view box with 3 buttons (Add, New, and Remove).
  5. Now go into the Customer stateless record type. Drag "Related_defects" field onto the Customer record type form. Both of them are parent/child or list view type field properties. The related_customer field will have the Add, New, and Remove buttons, but the back referenced field (related_defects) on the customer form will not. This is because a user can add or create a new customer from the Defect record type, but cannot create a new defect from the Customer record type.
  6. In the Rational ClearQuest client, for example there are 2 customers: Sue and Joe. If no customer records exist in the database, add two test customers.
  7. Login to the user database (SAMPL in this example) and submit 5 defects.
    1. Submit defect SAMPL000001 - Assume that no one is experiencing this problem, so do not add Sue or Joe to the related_customers field.
    2. Submit defect SAMPL000002 - This was reported by Sue. Go to the related_customers field and "Add" Sue to the list.
    3. Submit defect SAMPL000003 - This is a known problem that both Joe and Sue have reported. Here, "Add" both Joe and Sue.
    4. Submit defect SAMPL000004 - This is a known problem that both Joe and Sue have reported. Here, "Add" both Joe and Sue again.
    5. Submit defect SAMPL000005 - This was reported by Joe. Go to the related_customers field and "Add" Joe to the list.
Without ever doing anything to the customer records, run a query on the Customer record type. To see all of the defects that Sue has experienced, go into the Sue customer record. A read-only field called related_defects will be seen. SAMPL000002, SAMPL000003, and SAMPL000004 should be listed.

Run a query on the Customer record type. Looking at the customer record for Joe, SAMPL000003, SAMPL000004, and SAMPL000005 will be listed.

Note: It is not recommended to add a back reference field when creating a field that references its own record type. For example, creating a field "A" in the Defect record type that is of type REFERENCE_LIST to the Defect record type and then adding a back reference field to reference back to the Defect record type. This would cause a loop and often results in an out of range error. Back references should only be applied when using two different record types.

For more information on creating back references, see the topic: Linking records to create parent/child hierarchies in the ClearQuest 7.0.x information center.

Historical Number

20226

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational ClearQuest
Designer - Record Type Definition

Software version:

7.0, 7.0.0.1, 7.0.0.2, 7.0.1, 7.0.1.1, 2003.06.00, 2003.06.10, 2003.06.12, 2003.06.13, 2003.06.14, 2003.06.15, 2003.06.16

Operating system(s):

Windows

Reference #:

1125139

Modified date:

2009-10-25

Translate my page

Machine Translation

Content navigation