Defining linked attributes

Ensure you are familiar with the following characteristics that linked attributes can contain.

About this task

Attributes specified as link have the following characteristics and pertain to these rules of linking:
  • When defining linked attributes, you can choose another catalog as the target catalog or the same catalog to be both the source and target.
  • The attributes can be of any type and multi-occurring.
  • Link between a source catalog item and target catalog item is established using the primary key of the target catalog item.
  • Any indexed attribute of the target catalog can be selected as the display attribute (also known as the Destination Attribute Name on the Catalog Attributes screen) of link attribute. This may also be the primary key or the display attribute of the destination catalog. The attribute value of the target item is used for the display of link attribute values.
    Note: The display attribute of the target item is never stored as the value of link attribute but is used only for display purpose. If the value of the display attribute is empty or not set, by default the system displays the primary key value of the target item as the value of link attribute.
  • The link attribute and the primary key of the target catalog should be compatible. Following rules define the compatibility:
    • Link attribute and destination catalogs primary key should have the same internal type. Refer to the following topic for a representation of different attributes types in the system; Specifying the length of attributes in specs.
    • For all of these types, length of link attribute should be at least be equal to or greater than the length of the destination catalogs primary key attribute.
    • Where relevant, precision of link attribute should be at least be equal to or greater than the precision of the destination catalogs primary key attribute.
    • Any validation enforced by the system on the type of the link attribute is still enforced.
    • The target catalog of a link attribute will gather the items and objects from the cache if the target catalog is a cached catalog.

Procedure

  1. Create a primary spec with at least one attribute that is marked as Link.
  2. Create a catalog, which is based on this primary spec, for example, Catalog1.
  3. Create another catalog, Catalog2, which is going to serve as the target catalog. The Catalog2 primary key should be type compatible with the Link attribute of Catalog1, as defined above.
  4. Open the Catalog Attributes screen for Catalog1.
  5. Select the link attribute from the Src Attribute Name drop-down menu.
  6. Select Catalog2 from the Catalog drop-down menu as the target in the Link Attributes section.
  7. Select any attribute from the Destination Attribute Name drop-down menu. The Destination Attribute Name drop-down menu contains the indexed attributes defined in the primary spec of the Catalog2.