Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Document Properties Marker
overridefalse


Short DescriptionApplies a simple set operation on tables in its body.
Doctypemacrohide
NameTable Set Macro
Parent
Parent Property
property-nameName

Audience
Name List
doctyperole
render-no-hits-as-blanktrue
propertyAudience

Type
Name List
doctypemacro-type
render-no-hits-as-blanktrue
propertyType

Subject
Name List
doctypesubject
propertySubject

Categories

Name List
doctypecategory
namesVisual
propertyCategories


Tags

Tag List
namesTags
propertyTagsVisualproperty


Flags
page-size-limit-detection
hide
Iteration

Iteration
valueproduction

hide
Since2.1
Deprecatedhide
Removedhide
Sort Keyhide


...

Section
titleProperties


Section
titleSelected Column

Specify the column that identifies a table row.


Section
titleSet 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.


projectdoc-box-version
since6.2.0

The operation strict-and is available since version 6.2.0



projectdoc-section
titleColumn 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.


Section
titleHeader 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 

In-Document Link
anchorColumn Names
. Then map these names to the columns of the merged tables.

Example Box

For this example we assume a table merge based on and.

The columns of table one are Short Name and My Tags, of table two Short Name and OtherThe merged table should have the columns Name and Tags .

Section


Column


Panel
titleTable One


Short NameMy Tags
......




Column


Panel
titleTable Two


Short NameOther
......




Column


Panel
titleMerged Table


NameTags
......




This is the configuration:

Code Block
languagetext
titleColumn Names
Name, Tags


Code Block
languagetext
titleHeader Translations
Tags=My Tags|Other, Name=Short Name

Note that mappings a separated by a comma, alternative values from the table columns are separated by pipes.



Section
titleNo 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.

Version Box
since7.2

This parameter is available since version 7.2.



Section
titleCSS Class

Style information for the table


...

Section
titleMacro Body

Expected are two or more tables.


Section
titleDetails


Section
titlePage 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.


Section
titleMerging 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 

Static Document Link
documentDisplay Table Macro
and add additional information by a plain HTML table. 

Example Box

Suppose there is a couple of documents that describe books. For this example each book has a name (title) and the information about the author.

You need to list all books and you want to add the information,  if you have read the book or if you  are reading it.

The Table Set Macro does the merging of table rows. You need to select by the column 'Name' and the set operator 'or'.

Image Added

The Display Table Macro lists all books.

Image Added

Note that you select (Select: Name, Author|, Status|) the Status although this is not a property in the documents you are selecting. So this column will always be empty.

The information for the Status column is then added by your second table.

Image Added

The name column makes the match to merge the columns of the second table into the row of the first table. The Select of the first table defines the order of representation of columns and properties.

The resulting table:

Image Added

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.



Section
indextrue
titleRelated Macros


Tour
render-as-definition-listtrue
replace-title-with-nametrue


TitleShort Description
Table Merger Macro



...