<?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>Change the value of variable at runtime</title><link>https://community.appian.com/discussions/f/general/23329/change-the-value-of-variable-at-runtime</link><description>I want to the change the value of same tag in a single document at runtime 
 for example :- 
 Schedule_1 : A 
 Schedule_1 : B 
 Schedule_1 : C 
 Schedule_1 : D</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89649?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 15:54:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:71fff002-ed14-4627-b652-9952036f9119</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="3520" url="~/discussions/f/general/23329/change-the-value-of-variable-at-runtime/89637#89637"]dump the final output to your Word document through a single tag[/quote]
&lt;p&gt;This is what I was thinking of as well.&amp;nbsp; I&amp;#39;ve done it before and once you deal with a few preliminary challenges, the rest is pretty easy to handle, and it opens up the ability to build and parse custom templates (as long as the user creating the template strictly follows whatever replacement logic you dictate).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89637?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 13:40:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:feaac37c-31dd-4b2f-a467-e31914e1a339</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Then I would construct the content dynamically within an Appian ruleset, and dump the final output to your Word document through a single tag. You could think of your tag as a placeholder for the entire document you&amp;#39;re wanting to generate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89636?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 13:33:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ab362870-6c5d-4eb9-a9e9-7872020d0a9a</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;Is your document a plain text one ?&lt;/p&gt;
&lt;p&gt;If yes, one way you could achieve this is by reading the data in the document and apply a logic to replace the tags by your replacement values in an expression rule and then create that as a document.&lt;/p&gt;
&lt;p&gt;Off course, you should consider this from a performance standpoint&amp;nbsp;depending on the size of your document&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89634?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:26:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:111fd0ec-d1ce-4ca2-ba10-ee7eec62cf81</guid><dc:creator>saifalikhan13</dc:creator><description>&lt;p&gt;The content generation is dynamic and we do not know the sequence/number of tags in a document.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89633?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:19:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:61f41c99-e3de-447e-809c-089048b55183</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Is there static content between the various tags that you mention? If so I still think you will find this easier to assemble as one piece of content in an Appian rule 9or set of rules) and then have a single generic tag in your document that gets replaced by the content you&amp;#39;ve dynamically constructed in your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89632?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 12:13:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:835cb4de-1ba5-4a3a-ba74-489c7e54a43d</guid><dc:creator>saifalikhan13</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/stewart.burchell"&gt;Stewart Burchell&lt;/a&gt; &amp;nbsp;Actually, the scenario is&amp;nbsp;if the customer has used the tags like as following in document which has multiple pages and multiple number of tags have been used throughout the document. Then suppose there are 4 schedule tags in the current scenario,&lt;br /&gt;&lt;br /&gt;###Schedule_1### should be replaced with the value: Schedule A when it&amp;nbsp;occured first time in the document,&lt;br /&gt;&lt;span&gt;The very next time&amp;nbsp;###Schedule_1### is found, the value should change from Schedule B, and then the next time&amp;nbsp;###Schedule_1### should be Schedule C in the document.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In short, the number of occurences of the tag in the document will dynamically decide the value&amp;nbsp;against the tag that needs to be replaced.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Is is possible?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89631?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:13:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:625a925b-7284-4e67-a84d-caba7ad93ac3</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Why do you need to identify the &amp;quot;no of count of that tag in a document&amp;quot;? If you generate the content to include the labels, the values for those labels, and any newlines required between each content item then your tag will simply be replaced wiht the entire formatted content you&amp;#39;ve generated in your rule.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89630?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:08:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9f0a9330-eca1-4cff-afbe-ae197e5c7a42</guid><dc:creator>Richa sharma</dc:creator><description>&lt;p&gt;i already made rule&amp;nbsp;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt;local!data:{&amp;quot;name&amp;quot;,&amp;quot;name&amp;quot;,&amp;quot;name&amp;quot;},&lt;br /&gt;local!test:count({&amp;quot;name&amp;quot;,&amp;quot;name&amp;quot;,&amp;quot;name&amp;quot;}),&lt;br /&gt;a!forEach(&lt;br /&gt;items:local!data,&lt;br /&gt;expression:if(&lt;br /&gt;fv!index&amp;lt;=local!test,char(sum(64,fv!index)),&lt;br /&gt;char(sum(64,fv!item.[fv!index]))&lt;br /&gt;)&lt;br /&gt;),&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;p&gt;but while placing tag value in the document&amp;nbsp; how to identify the no of count of that tag in a document&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89629?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:07:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5844e21f-ab6c-4bac-a8b9-e4c9911a6b24</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;I agree with Stewart here.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s much easier to have it as ONE tag at least for this part of your document, and prepare this in a rule where you could play around easily with what data to put when one product is not available&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89628?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:02:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d446e41b-4ec0-4928-ac6c-38efe422383a</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Perhaps thinking about it a little differently...could you not have ONE tag that will hold ALL of the details formatted as you describe and you can construct that in a rule before passing it to the tag? We do this with emails sometimes, where it&amp;#39;s just easier to have the content constructed entirely in a rule, and then dump the entire content to the email. So you could have a tag named ##CONTENT## and this is replace by the formatted value from a single rule that covers everything you need it to contain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89627?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 11:01:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dfc6cb8e-d975-49e3-ad63-19421fc09492</guid><dc:creator>Richa sharma</dc:creator><description>&lt;p&gt;let suppose we have 3 product&amp;nbsp; A) TV, B) PHONE ,C) Washing MACHINE&lt;/p&gt;
&lt;p&gt;in document page A) product is not available then i want other product {B) To A) }to auto shift&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89626?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 10:53:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb797ae8-7865-49c3-8761-fe5653e6384a</guid><dc:creator>Richa sharma</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1641898357858v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;this is what client want&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89591?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 15:58:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c99e499-2ba6-417a-a103-1c0d61bb5338</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;Document Template would be static. So it would have a fixed number of ##Names## tag in your case.&lt;/p&gt;
&lt;p&gt;Why don&amp;#39;t you name them as ##Name1##,&amp;nbsp;&lt;span&gt;##Na&lt;/span&gt;&lt;span&gt;me2##,&amp;nbsp;##Name3##,&amp;nbsp;##Name4## ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or anything to make them unique and you can map it as usual.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you are using dynamic templates within the node, even then the keys should same, and if you are trying to achieve this to code the values easily, you may try to get a list of names and index it to the keys&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Eg:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you have your data as say in a pv!docData:&amp;nbsp;&lt;br /&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;name: {&amp;nbsp; &amp;nbsp; &amp;quot;Richa S&amp;quot;,&amp;nbsp;&amp;quot;R Sharma&amp;quot;, &amp;quot;Richa Sharma&amp;quot;, &amp;quot;Sharma Richa&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then in your node, you can map the keys as:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Name1: index(pv!docData, &amp;quot;name&amp;quot;, 1)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Name2: index(pv!docData, &amp;quot;name&amp;quot;, 2)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Name3: index(pv!docData, &amp;quot;name&amp;quot;, 3)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Name4: index(pv!docData, &amp;quot;name&amp;quot;, 4)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hope this helps !&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Or, can you explain your use case a little more, why do you need same tag to iterate on a list ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89578?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 12:37:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4ece289-ad41-44ff-b6eb-8e9b8cc6a24f</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;I was suggesting to try this plugIn, but i don&amp;#39;t have specific experience with this one. But worth a shot.&amp;nbsp;&lt;br /&gt;@Richa you can share your epxerience once you found a solution :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89577?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 12:33:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a8c8214a-9fb8-4739-a294-4b139bb8f05c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Depending on what you want to achieve, this one might be an option.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/b/appmarket/posts/advanced-document-templating"&gt;community.appian.com/.../advanced-document-templating&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89576?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 12:29:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:987aa621-d662-4e4e-a5a6-1a00ad71796b</guid><dc:creator>Richa sharma</dc:creator><description>&lt;p&gt;Any other smart service , which support this approach?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89575?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 12:13:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb415350-d9a2-4708-8a3f-a394b021fbd9</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK, got it. This Smart Service does not support that. For this to work, tags must be static and unique.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89573?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 11:19:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:68ab7187-1f72-4173-9ea4-f39c6cb68194</guid><dc:creator>Richa sharma</dc:creator><description>&lt;p&gt;while generating document tags are replaced by the values&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1641813131227v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In Single document&amp;nbsp; if single tag is placed more than one time then it always replaced with a single value&amp;nbsp; suppose ##Name## placed 4 times in a single document the all the tags replace with the same value .&lt;/p&gt;
&lt;p&gt;example:-&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : Richa&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : Richa&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : Richa&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;my requirement is when i place single tag more than one time in a document then it replace with the different values&lt;/p&gt;
&lt;p&gt;example:-&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : A&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : B&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;##Name## : C&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change the value of variable at runtime</title><link>https://community.appian.com/thread/89572?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 10:56:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5318b18d-6a85-412e-b863-51c217a0acdc</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Please help me to understand what you want to achieve. What do you mean with &amp;quot;tag&amp;quot; and &amp;quot;document&amp;quot;. Please elaborate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>