ProApp Designer - Release 14.10 (Package 22)

Using Controls: Repeating Text Content

Repeating Content Controls allow entire tables or specific sections within a Word document to be repeated multiple times, each populated with a different dataset. This functionality relies on input provided in XML format, leveraging Microsoft Word’s custom XML feature to dynamically generate content.

For more details on Word’s custom XML capabilities, please refer to the following link:

https://docs.microsoft.com/en-us/visualstudio/vsto/how-to-add-custom-xml-parts-to-document-level-customizations?view=vs-2019

The WebSynchronizer application processes JSON input received from an Aras Innovator Server Method, which is configured as the data source property of the Document Template item. When the associated content control in the Word template is a repeating control, WebSynchronizer automatically converts the JSON data into XML format. This XML is then used to populate the repeating sections in the document. For example, in the case of a table, the data row will be repeated as many times as there are entries in the XML dataset.

Please refer following XML for condition table which is returning single condition. Rows will be repeated number of times for <SupplierToPart.related_id> tag in XML.

<root>
<SupplierToPart.related_id>
<name>Test1</name>
<item_number>1211</item_number>
<state>Preliminary<state>
</SupplierToPart.related_id>
</root>

For Reference, please also find the relevant JSON below.

"\" SupplierToPart.related_id \"
:[{\"name\":\"Test1\"
,\"item_number\":\"1211\"
,\"state\":\"Preliminary \"}]”

Following image shows how repeating content control is mapped to <%SupplierToPart.related_id%> which is tag from XML.