<?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>Docx From Dynamic Template</title><link>https://community.appian.com/discussions/f/plug-ins/20843/docx-from-dynamic-template</link><description>Hi All, 
 
 I&amp;#39;m trying to generate table in docx Using Docx From Dynamic Template. When trying with sample data and template as given below 
 &amp;quot;&amp;lt;info&amp;gt; 
 &amp;lt;rowvalues name = &amp;#39;John Samuael&amp;#39; branch= &amp;#39;CSE&amp;#39; rollNum= &amp;#39;abc&amp;#39; /&amp;gt; 
 &amp;lt;rowvalues name = &amp;#39;Michelle Dsouza</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81221?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 17:04:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d43d4a33-52f5-4cf4-8c66-833d65898f98</guid><dc:creator>khabran</dc:creator><description>&lt;p&gt;So, in the XML code, you need the name of each field to match the respective field in the template. For example:&lt;/p&gt;
&lt;p&gt;=&amp;lt;project&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;sectionFourTable&amp;gt;&amp;quot; &amp;amp; rule!NameOfYourRule(pv!input) &amp;amp; &amp;quot;&amp;lt;/sectionFourTable&amp;gt;&lt;/p&gt;
&lt;p&gt;Then, inside of your template you should have the something similar to the code I previously used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81219?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 15:55:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a92e3dd5-72d5-40fe-9d80-ff0be22cab7e</guid><dc:creator>ankitas0202</dc:creator><description>&lt;p&gt;&lt;span&gt;doc.project.sectionFou: Is this document name or something else&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or your xml is in given structure: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;project&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;sectionFou&amp;nbsp;number=&amp;quot;1&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;sectionFou&amp;nbsp;number=&amp;quot;2&amp;quot;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81218?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 15:53:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:78b79d23-a536-4769-9eb9-30cc6e08aeab</guid><dc:creator>khabran</dc:creator><description>&lt;p&gt;You are definitely missing the &amp;quot;if&amp;quot; portion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81217?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 15:53:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4be354d3-4b92-417b-9077-fa44afe735a4</guid><dc:creator>khabran</dc:creator><description>&lt;p&gt;Also, have you checked the fields of your Word Template? To make sure that the respective variable is assigned to that field?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81216?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 15:51:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d771aa17-99de-4d91-a86c-e37562e9cd14</guid><dc:creator>khabran</dc:creator><description>&lt;p&gt;Then, in the XML Data Code, you just need to call the expression that is looping through to populate the table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docx From Dynamic Template</title><link>https://community.appian.com/thread/81215?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 15:50:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f728da6a-561f-4aec-9245-db064445f6be</guid><dc:creator>khabran</dc:creator><description>&lt;p&gt;For tables, you need something like the following in your document template:&lt;/p&gt;
&lt;p&gt;&amp;laquo;[#if&amp;raquo;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="344"&gt;
&lt;p&gt;Item #&lt;/p&gt;
&lt;/td&gt;
&lt;td width="149"&gt;
&lt;p&gt;Description&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102"&gt;
&lt;p&gt;Unit/Issue&lt;/p&gt;
&lt;/td&gt;
&lt;td width="130"&gt;
&lt;p&gt;Quantity&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="344"&gt;
&lt;p&gt;&amp;laquo;@before-row[#list doc.project.sectionFou&amp;raquo;&amp;laquo;${d.@number}&amp;raquo;&amp;laquo;@after-row[/#list]&amp;raquo;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="149"&gt;
&lt;p&gt;&amp;laquo;${d.@description}&amp;raquo;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102"&gt;
&lt;p&gt;&amp;laquo;${d.@unit}&amp;raquo;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="130"&gt;
&lt;p&gt;&amp;laquo;${d.@quantity}&amp;raquo;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;laquo;[/#if]&amp;raquo;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>