Table Header Attributes - Recommended Practice

Creating a description attribute that is valid on attributes—and exclusively used for creating table header values—is a recommended practice when generating table headers. Using this type of attribute is a more flexible and dynamic way to generate table headers instead of using non-dynamic free text or cumbersome transformations to change an attribute name into a value suitable for a table header. Free text is too easily removed or edited by a workbench user, and language translation is difficult to set up and maintain.

In addition, such an attribute can be used in product templates if table headers must be placed onto the template instead.

The instructions in this topic assume the following:

  • You have created a table and understand how to define content definitions.
  • You have an understanding of how to create and populate attributes.

Example Table Using a Table Header Attribute

In this basic example, the table has four columns containing specification attributes, each with a content definition of Attribute. The header row is using a content definition of Meta Data Attribute.

The values in the header row—Name, Color, Summary, and Details—are populated by the values of a description attribute named 'Table Header.' This attribute is valid on the Attribute object type.

If attribute 'Name' were used instead of 'Table Header' for the header row's content definition, then the names of the attributes would be pulled for the values instead—Product Name, Primary Color, Short Item Description, and Long Item Description. In all likelihood, these would not be the preferred values for the column headers.

Creating a Table Header Description Attribute

  1. In System Setup, navigate to the attribute group in which you would like to create your attribute, then right-click and select New Attribute.
  2. In the Create Attribute dialog, give the attribute an ID and Name (for example, 'Table Header'), then select Text for Validation Base Type and No for Multi Valued. Click Next.
  3. Provide a Maximum Length that aligns with the typical number of characters currently used as a column header in step 3 (Enter Validation Rule). This will probably be around 30 or 40 characters rather than the default 100.
  4. Click Next two more times to bypass the screens for steps 4 and 5 of the wizard. (As this attribute will only be valid on attributes, there is no need to make it valid on product types. However, you may later make it valid on additional objects if a need arises.)
  5. In step 6 (Apply Dimension Dependencies), choose Country and/or Language if you want the values of this attribute to be translatable.
  1. Click Finish. No additional steps are needed, as this is a description attribute valid only on attributes.

Applying Attribute Validity to the Table Header Attribute

  1. Next, navigate to the Attribute object type, located in System Setup > Object Types & Structures > Basic Object Types > Attribute Group > Attribute.
  2. On the Object Type tab, expand the 'Valid Attributes' flipper, then click Add Attribute.
  3. In the 'Please Select Attribute' dialog that displays, browse to or search for the table header attribute that you just created, then click Select.
  4. The table header attribute is now valid on attributes.

Populating Values for the Table Header Attribute

Now that the table header attribute is valid on attributes, it appears under the Description flipper on all attributes.

  1. In System Setup, navigate to the specification attributes that you will be using in your table.
  2. Locate your table header description attribute, then enter the value that you would like to appear as the table header for this attribute.
  3. In the following screenshot, a value of 'Summary' has been entered as the value for 'Table Header' on the attribute named 'Short Item Description.'

  1. Now, on the table, the value of 'Summary' appears as the header for the 'Short Item Description' column.