<?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>Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/discussions/f/plug-ins/14693/eliminate-empty-spaces-where-variable-value-is-empty-in-the-document</link><description>Hi all, 
 I am trying to generate a document where I need to place in new line some text in word document also I need to eliminate empty spaces generated when any variable value is empty . I tied both docx to dynamic temmplate as well as MS word 2007</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/thread/65875?ContentTypeID=1</link><pubDate>Sun, 14 Apr 2019 15:52:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca9483ca-5ed4-4534-acc3-30d86277c9b6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Why are you wrapping the code I gave you in toHtml()? &amp;nbsp;That function is sanitizing the text prior to insertion (it replaces &amp;quot;&amp;lt;&amp;quot; and &amp;quot;&amp;gt;&amp;quot; with their HTML-safe equivalents) - and my code needs to be inserted unaltered in order to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/thread/65874?ContentTypeID=1</link><pubDate>Sun, 14 Apr 2019 14:23:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc0bdabe-fc41-4b41-b3c2-81722f6faf62</guid><dc:creator>jaganc</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;T&lt;img alt="this is the code i wrote in smart service" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/19/Capture-code.PNG" /&gt;hanks again for your replay, i am using MS word doc from 2007&amp;nbsp; smart services&amp;nbsp;, the code which i wrote&amp;nbsp;=if(and(rule!APN_isBlank(pv!x),rule!APN_isBlank(pv!y)),char(0),if(not(and(rule!APN_isBlank(pv!x,rule!APN_isBlank(pv!y))), pv!x &amp;amp; toHtml(&amp;quot;&amp;lt;/w:t&amp;gt;&amp;lt;w:br/&amp;gt;&amp;lt;w:t&amp;gt;&amp;quot;) &amp;amp;pv!y&amp;amp; toHtml(&amp;quot;&amp;lt;/w:t&amp;gt;&amp;lt;w:br/&amp;gt;&amp;lt;w:t&amp;gt;&amp;quot;),if(rule!APN_isBlank(pv!x,upper(pv!y),upper(pv!y)))) and also attaching the screen short&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/thread/65870?ContentTypeID=1</link><pubDate>Sat, 13 Apr 2019 17:04:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e5f3bd62-6f59-4464-8756-0aafc8fd9f9e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Can you confirm which smart service node you&amp;#39;re using to try this? &amp;nbsp;And can you post a screenshot of the configuration of the replacement value in the node?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/thread/65869?ContentTypeID=1</link><pubDate>Sat, 13 Apr 2019 16:41:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ab36055-f522-4a8e-adec-757407fbfe9f</guid><dc:creator>jaganc</dc:creator><description>&lt;p&gt;thanks for your replay, i tried with this code in my expression rule and attached is the document generated it gives the &amp;quot;&amp;lt;/w:t&amp;gt;&amp;lt;w:br/&amp;gt;&amp;lt;w:t&amp;gt;&amp;quot; in the document itself.&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-discussions-components-files/19/testdoc.docx"&gt;community.appian.com/.../testdoc.docx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eliminate empty spaces where variable value is empty  in the document</title><link>https://community.appian.com/thread/65834?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 20:01:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc220c37-988c-4d66-864a-60fbc6cf85a7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Using the standard (MS Word 2007 from Template) smart service, if you inject this code it&amp;#39;ll produce a linebreak for you:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;/w:t&amp;gt;&amp;lt;w:br/&amp;gt;&amp;lt;w:t&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>