<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Advanced Document Templating</title><link>https://community.appian.com/discussions/f/plug-ins/40438/advanced-document-templating</link><description>How can I iterate the whole table for the requirement? How should the syntax be placed for Advanced Document templating plugin. I understand the code how we can loop through the rows in a grid but how can we loop the grid itself? eg: If I have 5 employees</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Advanced Document Templating</title><link>https://community.appian.com/thread/154635?ContentTypeID=1</link><pubDate>Tue, 19 May 2026 05:48:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b76178b8-3ee0-4421-ac98-101def9eb565</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Use this&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[#list labor.employee as emp]

| Name | ID | Role |
| ${emp.name} | ${emp.id} | ${emp.role} |

[/#list]&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advanced Document Templating</title><link>https://community.appian.com/thread/154629?ContentTypeID=1</link><pubDate>Mon, 18 May 2026 15:59:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:69dbca4e-43d4-4348-881b-9f8e8e7257ce</guid><dc:creator>aishwaryap610839</dc:creator><description>&lt;p&gt;How do we write the repeat block logic for per employee in WORD as you mentioned?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advanced Document Templating</title><link>https://community.appian.com/thread/154628?ContentTypeID=1</link><pubDate>Mon, 18 May 2026 13:21:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5cf38bdf-ed0b-4fb9-9f97-db83306a6fff</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;You cannot loop the grid itself; instead, build XML with repeated &amp;lt;employee&amp;gt; nodes using a!forEach and concat, then wrap the entire table inside a repeat block for each employee in your DOCX template so 5 employees produce 5 separate grids.&lt;/p&gt;
&lt;p&gt;See this example&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!labor: {
    a!map(name: &amp;quot;John&amp;quot;, id: &amp;quot;101&amp;quot;, role: &amp;quot;Developer&amp;quot;),
    a!map(name: &amp;quot;Mary&amp;quot;, id: &amp;quot;102&amp;quot;, role: &amp;quot;Tester&amp;quot;),
    a!map(
      name: &amp;quot;Sam&amp;quot;,
      id: &amp;quot;103&amp;quot;,
      role: &amp;quot;Business Analyst&amp;quot;
    )
  },
  concat(
    &amp;quot;&amp;lt;project&amp;gt;&amp;quot;,
    &amp;quot;&amp;lt;labor&amp;gt;&amp;quot;,
    joinarray(
      a!forEach(
        items: local!labor,
        expression: concat(
          &amp;quot;&amp;lt;employee&amp;gt;&amp;quot;,
          &amp;quot;&amp;lt;name&amp;gt;&amp;quot;,
          fv!item.name,
          &amp;quot;&amp;lt;/name&amp;gt;&amp;quot;,
          &amp;quot;&amp;lt;id&amp;gt;&amp;quot;,
          fv!item.id,
          &amp;quot;&amp;lt;/id&amp;gt;&amp;quot;,
          &amp;quot;&amp;lt;role&amp;gt;&amp;quot;,
          fv!item.role,
          &amp;quot;&amp;lt;/role&amp;gt;&amp;quot;,
          &amp;quot;&amp;lt;/employee&amp;gt;&amp;quot;
        )
      ),
      &amp;quot;&amp;quot;
    ),
    &amp;quot;&amp;lt;/labor&amp;gt;&amp;quot;,
    &amp;quot;&amp;lt;/project&amp;gt;&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>