Table Set Macro

Applies a simple set operation on tables in its body.

Categories
Visual
Since
2.1

The Table Set Macro applies a selected set operation on tables within the macro's body. Each table is considered a set of elements. Elements are identified by the contents of the selected column.

3 tables into 1: Use case with table merger and table set macro

Properties

Selected Column

Specify the column that identifies a table row.

Set Operation

Select the operation on the sets, provided by tables within the macro body.

andSelect only on rows that are part of all tables.
orSelect rows that are part of any table. Table row columns are merged for cells are blank.
notRemove rows from the first table that appear on any other table.
strict-and

Select only on rows that are part of all tables and the number of tables must be greater than one. Otherwise the result is empty.

Column Names

Specify the names of the columns to merge in any order.

Append a character to control the alignment of the column (header and data).

SignDescription
<Left alignment
|Center alignment
>Right alignment

If no controls are specified, the styles of the first table are applied to the result column.

Header Translations

Comma-separated list of key list-value pairs to map columns from tables.

Format: k1=v1|v2, k2=v3.

To translate the headings of the tables to be merged, specify the desired column name with the Column Names. Then map these names to the columns of the merged tables.

No Content Text

The alternative text to be rendered in case the result table set is empty.

If no alternative text is specified, nothing will be rendered in case the result set is empty.

CSS Class

Style information for the table

Macro Body

Expected are two or more tables.

Details

Page Size Warnings

This macro supports macros that render a table. If such a macro runs into the limits set by the page size configuration and renders a warning, then this macro will render an error.

Merging Table Columns into Rows

The Table Set Macro allows to merge the columns of tables to merge into one row in the result table. In this case you need to use the Set Operator 'or'. You need to make sure that all columns of the resulting table are present in the first table.

This allows you to for instance generate a table by the use of the Display Table Macro and add additional information by a plain HTML table. 

With this use case you may add information to a document listing that is not present in the documents. The difference to adding this information to the document is that you cannot select on it and cannot reuse this information in other queries. But it allows to add information that is only relevant in one specific use case.

Related Macros

Other macros dealing with tables and lists.

Table Merger Macro
Merges tables (and lists) into one table (or list).
Count Macro
Renders the count of rows, list items, or definition terms.