Repeating Sections (Loop)

Repeating data, from an array of data, can be displayed in many ways.

This example contains: each item on a new line, each item on the same line, bullet lists and numbered lists.

 

1) Defining a repeating section

Repeating Sections start with <<rs_ and finish with <<es_ (End Section).

This example uses a list of people: <<rs_people>>...<<es_people>>

In your data you would have an array of objects like this (JSON example):

    "people":[{"name":"John"}, ... ]  (JSON example).

 

So, <<rs_people>><<name>><<es_people>>, is like saying:

FOR all people LOOP

replace each <<name>> with data up to <<es_people>>

 

If <<rs_ or <<es_ appear on a line by themselves, then that line does not appear in the final document.

 

2) One per Line,  Many per Line.

The first Repeating Section lists one item per line, because in the template <<name>> appears on a line by itself.

The second example has a single space following <<name>>.  The closing <<es_ appears before the end of the line, so all the names are repeated on one line.

 

3) Numbered Lists and Bullet Lists

The first list shows a numbered list.  In the template the line <<name>> has been formatted as a numbered list item.

The second lists is a bullet list, because in the template the line with <<name>> was formatted as a bullet point.

The lists will grow to match the size of the data.

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

Related items