Repeating Sections or Paragraphs

Similarly to the article covering Numbered and Bulleted Lists; the Encodian population engine supports repeating sections/paragraphs, in fact, anything within a word document that could be repeated. The source JSON data must be in the form of an array, i.e. one or more items in the list.

Populate a repeating sections / paragraphs

Example Document: Encodian - Template Syntax - Repeats.docx

Example JSON Data:

{
"companyName": "Encodian",
"members": [
{
"listFirstName": "Efren",
"listLastName": "Gaskill",
"age": 45,
"homeTown": "Clearwater"
},
{
"listFirstName": "Sanly",
"listLastName": "Keyme",
"age": 19,
"homeTown": "Kensington"
},
{
"listFirstName": "Mark",
"listLastName": "Nigma",
"age": 36,
"homeTown": "Silver Spring"
}
]
}

Configure the document as required interlacing tokens within your actual content, for example:

<<foreach [member in members]>><<[member.listFirstName]>> <<[member.listLastName]>> is <<[member.age]>> years old and lives in <<[member.homeTown]>>.
<</foreach>>

mceclip2.png

This generates the following output:

mceclip0.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk