Conditionally remove table rows

Use the conditional rows <<cr_ directive in a template to include or exclude single or multiple rows from a table.

You can filter out multiple rows based on conditions in the supplied data.

Defining conditional rows

In a table row, add a conditional row field:

<<cr_book1>>

which marks the beginning of a set of rows to be optionally filtered out. The end marker is placed in a row further down the table:

<<er_book1>>

If the data value book1 is true, all rows between the <<cr_book1>> row and the <<er_book1>> row will be included.  The rows containing the <<cr_>> and <<er_>> are always removed.

Conditional rows within repeating rows

There is no limitation to using conditional rows within tables. 
Conditional rows can be nested within other conditional rows or used within repeating rows.
In the example template, because the <<cr_inStock>> conditional row is positioned within the loop <<rr_newspapers>>, the conditional row will be tested for each data item in newspapers, and each one that have inStock equal to true will be included.

Conditional rows and expressions

Expressions may be used in the conditional field in order to test more complex conditions.
They are included in braces and cause the rows between to be included if true.
The rows between the <<cr_{description!=null&&description!=''}>> and the <<er_>> are only included if the "description" of a particular "newspapers" is present (i.e. not equal to null) and is not blank.

Feedback

Invalid Input

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam. Please also consider contacting support@docmosis.com if you need help with this article.

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam.

Invalid Input