Conditional Sections (IF Statements)

Conditional Sections allow any content in the template to be included or removed from the final document, a bit like an "IF" statement.

They can be used to add/remove parts of a numbered list so that the list numbering adjusts automatically.

 

1) Conditional Sections

These start with <<cs_ and end with <<es_ (End Section).

These are like IF statements. <<cs_sampleValue1>> is like saying:

IF sampleValue1= "true" THEN

display all text up to <<es_sampleValue1>>

In your data you would have: "sampleValue1":"true" (JSON example).

If <<cs_ or <<es_ is on a line by itself - the line is removed in the final document.

 

2) List Numbering adjusts automatically

The Numbered List has the second item surrounded by: <<cs_ and <<es_.

The data contains: "sampleValue2":"false"  (JSON example).

In the final document item 2 does not appear.

The numbering of the remaining items in the list adjusts automatically.

TRY: changing "sampleValue2" to "true".

 

3) Regular Expressions inside { braces }

The expression {sampleValue3=7} will be evaluated.

If "true" then all following text up to the next <<es_ will appear in the final document.

In your data you would have: "sampleValue3":"7"  (JSON example).

Feedback

Invalid Input

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

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

Invalid Input

Applies To

Docmosis-Java Tornado Cloud
Version(s) ALL ALL ALL