Skip to main content

Row Expand Changes in Tag Processor 2

Tag Processor 2 introduces some new functionality that differs from Tag Processor 1 (Legacy) to provide simpler and clearer functionality that will allow easier construction of more complex use cases within Fluent Templates. Amongst these changes are updates to row expanding ForEach tags. This article will explain those differences and why we made those changes.

Change 1: Row ForEach Tag Placement

The first change made to Row Expanding ForEach Tags (i.e. ForEach tags with order=row) is that the Row Expanding ForEach Tag must be placed in the first column of the row you would like the expansion to begin. If you attempt to place the ForEach Tag in any other column you will receive a detailed error message stating the ForEach Tag must be in the first column of the row. This change was made to provide a more intuitive and clear way to define the scope of the row expanding ForEach Tag.

info

The Row ForEach Tag can be in any row as long as it is placed in the first column of the row.

Example 1: Valid Row Expansion Setup

Below is a table that is properly set up for row expansion. The ForEach Tag is placed in the first column of the row where the expansion will begin.

Here is another example of a valid row expansion setup:

Example 2: Invalid Row Expansion Setup

Below is a table that is not properly set up for row expansion. The ForEach Tag is placed in the second column of the row where the expansion will begin. The user will receive an error message stating the ForEach Tag must be in the first column of the row if they attempt to generate a report with this setup.

Change 2: End ForEach Tag Placement

Unlike the Start Row Expansion ForEach Tags, in Tag Processor 2, the End ForEach Tag (for a Row Expanding start tag) can be placed in any column of the final row of the expansion. The End ForEach Tag in the context of a Row Expand ForEach Tag simply marks what the last row of the expansion will be. If you place the End ForEach Tag in the first column, last column, or middle column of the final row of the expansion, the expansion will output the same way.

Example 1: Varied End ForEach Tag Placement

Given the 3 examples below, the output of the row expansion will be the same in each case. The End ForEach Tag is placed in the first column, last column, and middle column of the final row of the expansion.

The output for the 3 separate tables are below. Notice they all produced the same output.