Applying Attribute Transformations to Table Content

An attribute transformation performs a task on an attribute such as inserting a prefix or converting periods to commas. There are numerous reasons to apply a transformation to an attribute in a table, but some additional use cases include removing a space between numbers and units and specifying how to separate values if there are multivalued attributes in the selected attribute group.

Transformations can be applied to rows, columns, or cells that use any of the following content definitions:

  • Attribute
  • Attribute Group Attributes
  • Commercial Data
  • Composite Attribute - All Attributes
  • Composite Attribute - Single Attribute
  • Parent Name

This topic explains how to apply preexisting attribute transformations to data in tables. For more information on how to create and configure an attribute transformation, refer to the Attribute Transformations section of the System Setup documentation here.

To Apply Attribute Transformations

  1. Follow the steps in the Adding, Editing, and Overriding Content Definitions topic here to open the Row/Column Type & Content Definition dialog for your row or column.
  2. In the 'Column/Row Content Definition' dropdown list, select one of the relevant content definitions mentioned in the introductory section of this topic (e.g., Attribute, Attribute Group Attributes, etc.). For this example, Attribute has been selected.

  1. In the Transformation field, click the ellipsis button () to display the Select Transformation dialog. The top section of the dialog lists the 'Attribute Specific' transformation(s), e.g., transformations that have been applied to the attribute.

The bottom section of the dialog lists the 'Global' transformations, which are transformations that have nothing selected under the 'Applies To' flipper on the Attribute Transformation tab. Having no options selected allows these transformations to be global and not limited in where they can be used.

  1. Select the relevant attribute transformation from the list, then click OK. The transformation is applied to the selected attribute.

To Remove Attribute Transformations

In the 'Select Transformation' dialog, click Select None.

Basic Attribute Transformation Example for a Table Column

This example uses an attribute transformation that appends a text value of -A to the STEP ID.

The attribute transformation has been applied to the ID in System Setup.

Because the transformation has been specifically applied to something (in this case, ID), the transformation appears in the upper half of the Select Transformation dialog, and not at the bottom with the global transformations.

Table before applying the transformation:

Table after applying the transformation:

Advanced Attribute Transformation Example for a Table Column

The following example shows a more advanced attribute transformation that can be applied to a table column to change all codes (STEP IDs) that start with the letter 'D' to all caps and a red text color. This example combines the following STEP functionalities:

  • A STEP style tag that utilizes an InDesign character tag in its output formatting. For more information, refer to the Publication Template Layout, Formatting, and Styles topic in the Print Publisher documentation here.
  • A regular expression. For more information, refer to the Regular Expression section of the System Setup documentation here.

Sample Setup

  1. First, create a style tag in System Setup that is configured to output red text. The tag in this example corresponds to a character style in the publication template named 'red,' which is called out in the output formatting within the InDesign tag <CharStyle:red>.

  1. Next, create an attribute transformation in System Setup intended to transform the STEP ID to upper case.

  1. Click Add Transformation to add a second transformation using 'Replace substrings of the value using a regular expression.'
  2. Configure this second transformation as follows:
  • Replace first match of
  • (D.+)
  • with <red>$1</red>

  1. Apply this transformation to a table column that contains STEP IDs, following the steps outlined in the first section of this topic.