<?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>Consecutive expressions inside a same Script task</title><link>https://community.appian.com/discussions/f/process/20884/consecutive-expressions-inside-a-same-script-task</link><description>Hi, 
 I&amp;#39;ve read that input ou output expressions inside a script tasks are not consecutives, 
 and the fact that Developer must not count on this. 
 
 If I have to create and use a custom counter, and then get a CDT value from this array at the index</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Consecutive expressions inside a same Script task</title><link>https://community.appian.com/thread/81326?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 12:49:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6add709b-02e2-4b5e-b8db-730201a8c699</guid><dc:creator>cedric02</dc:creator><description>&lt;p&gt;Thank you Stefan, this seems logical.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Consecutive expressions inside a same Script task</title><link>https://community.appian.com/thread/81325?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 11:45:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4faeb422-0ba9-4ea1-837c-bc890ea8ab1a</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You cannot store data to PV in an input. I know the there is a &amp;quot;save into&amp;quot;, but that is just a short cut and evaluated at the same time as any output definitions. The way you would do this is&lt;/p&gt;
&lt;p&gt;INPUT:&lt;/p&gt;
&lt;p&gt;ac!counter = pv!myCounter + 1&lt;/p&gt;
&lt;p&gt;OUTPUT:&lt;/p&gt;
&lt;p&gt;pv!myCounter = ac!counter&lt;/p&gt;
&lt;p&gt;pv!d&lt;span&gt;ata = index(pv!myData, ac!counter, null)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Consecutive expressions inside a same Script task</title><link>https://community.appian.com/thread/81323?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 11:04:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:361c5fa6-28e9-4a8e-b3f2-a9fe2659de24</guid><dc:creator>cedric02</dc:creator><description>&lt;p&gt;After reading this POST I have some additional informations.&lt;br /&gt;&lt;a href="/discussions/f/process/18720/evaluation-order-of-inputs-saveinto-s-and-outputs-in-process-model"&gt;https://community.appian.com/discussions/f/process/18720/evaluation-order-of-inputs-saveinto-s-and-outputs-in-process-model&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I can be sure Input nodes are executed before Output Nodes, can you confirm I could do this please ?&lt;/p&gt;
&lt;p&gt;New Input :&amp;nbsp;&lt;span&gt;pv!counter&amp;nbsp; = myCounter +1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;New Output&amp;nbsp;:&amp;nbsp;&lt;span&gt;pv!data = index(pv!myData, pv!counter, null)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>