Enhanced Tabular Fields

Enhanced vs Regular Tabular Fields

Advantages over regular tabular fields include:

  • Field Options are supported. Most regular types can be used;  Images, Hyperlinks, Barcodes, etc.
  • Multiple level sorting.  Sorting is a global property for each Tabular Field.
  • Rather the relying on a ‘Computed Field’ command to determine linked content, the field name includes all the elements required.
  • Menu options like Replace Fields and Update Document->Panel Selection are supported.
  • Tables are populated using the same method as regular tabled, so cell merging, etc work exactly the same.
  • Table filters can be used to selectively populate content.
  • Enhanced tabular fields can be contained inside each other.

Configuring

Taking the example field content below:

Tabular fields are configured via the Field Options, so we can right click on “Tabular Value” in the data panel and set it to be a  “Tabular” format field with the  “Type” of “Enhanced”. Other settings used in this example are shown here:

The press “Configure…” and define the delimiters used in the data:

Column Identifiers

It’s crucial to check if the first row contains a valid Column ID because it becomes the field’s name. If it’s valid, designate it as “Column Content Top”. For clarity, all values must be unique, not empty, and cannot include “[” or “]” (These are used by the linking mechanism). Having a valid Column ID makes it easier to identify fields in dialogs and menus. By default, the Column ID is the index of a column, ranging from 0 to n. When we set the Column ID  to “Column Content Top”, we get:

Row Identifiers

If the tabular field contains a consistent key, this can be used instead of the default row index. In this example the first column on the left is used, which is the the contents of the Product column. Like Column IDs, these values must be unique.

Field Options

Once settings are applied, Right clicking a field in the data panel allows the Field Options to be edited. The field options pop-out menu also list the names of any visible tabular fields.

Linking Mechanism

With Enhanced tabular fields, the field name element of a link identifies which cell the data links to. The following example shows a single link after it’s inserted:

 

Inspecting the Computed Field Panel reveals a field name of  Tabular Value[Product][Coffee Maker]

This breaks down as:

  • Tabular Value  – Name of the Parent Tabular Field.
  • [Product]  – Column ID.  Identifies which column the data comes from.
  • [Coffee Maker]  – Row ID. Identifies which row the data comes from.

Nesting

Another Advantage is the ability for Tabular Fields to contain Tabular Fields. In the example data, the Description field is a comma separated list which can be configured as another delimited tabular field. Setting Tabular[Description] up like this way results in:

 

In this case the data doesn’t contain content which can be user as visible row or column IDs, so defaults is used (indexes).  Inspecting the Computed Field panel reveals a field with the name of:

Tabular Value[Decription][Coffee Maker][0][1]

Breaking this down:

  • Tabular Value[Decription][Coffee Maker] – Identifies the parent field.
  • [0][1][0] is the Column ID within the parent tabular field, [1] is the Row ID.

Populating Tables

When selecting and inserting a parent tabular field or multiple cells of a tabular field, a table gets created with the selected content. When the table is created it automatically gets a property to indicate which tabular field the rows in the table map to:

Selecting the tabular field the top level and inserting it gives the following, with the description tables fields created as tables inside the parent:

The table is set to Expand Vertically with Tabular Records from Tabular Field[Description]

Using Containers

Rather than a table in the Description column, we may want individual elements. A Container can be used for this. The Formatting Rules inside the Containers needs to be configured to populate data from the tabular field. In this case we setup a yellow frame with a field specifier:

In the Formatting Rules settings dialog, we need to tell it where it should be used. in this case Once for each record in Tabular Value[Description]

 

Now we define  prototype table with a Container in the Description column:

Once this is setup, populating the table with the top level gives:

Field Options Storage

The field options are stored hierarchically in the Fields.xml file. Only fields that have been edited are stored. It’s worth noting that once a fields options have been edited, it will be persisted permanently (the field may be removed from the data and later reappear).  This could lead to an excessive amounts of data if the Column IDs are ad-hoc or change regularly. Use column indexes in this case to avoid this issue.

Advanced Formatting

Post processing can be used to format cells that fields appear in.  For example, when the Product field appears in a table cell, we may want to apply a cell style to it. The cell options move with the field, so it doesn’t matter where the field appears in the table, the setting from the tabular cell are applied. Certain commands aren’t supported such as setting the row and column span, but the majority formatting options are available.

Ceating a prototype table with the Product column in a different position results in the cell style from the original tabular field being applied to the correct column: