<?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>Counter what&amp;#39;s the best expression to use</title><link>https://community.appian.com/discussions/f/process/24436/counter-what-s-the-best-expression-to-use</link><description>Hey all, 
 I am trying to have a loop where a counter is increased once per day ( with a timer set to tat interval ). So when the 2nd task is activated, I would be able to subtract that counter from the max of 12 days. 
 Im quite new in Appian, and I</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Counter what's the best expression to use</title><link>https://community.appian.com/thread/94314?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 17:21:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:adb07469-a7f6-4c90-9327-483a342a5b99</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You can save the current date (and/or DateTime) at the time of completion of a task into a Process Variable (i.e. &amp;quot;pv!task1CompletionDate&amp;quot;), then do subsequent logic with that in later tasks.&amp;nbsp; Particularly as it&amp;#39;d be pretty easy to get the number of elapsed days between two dates, and use that to refine your logic in various places as you see fit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counter what's the best expression to use</title><link>https://community.appian.com/thread/94307?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 16:47:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11940ed6-0841-4e5e-bad3-7cc7bbd19d35</guid><dc:creator>victoriab0001</dc:creator><description>&lt;p&gt;What I need is that fo For both tasks, the&amp;nbsp;1st and the 2nd task, I need to implement/adjust alerts as follows. Number of days are calculated since the sending of the &amp;#39;1ST TASK&amp;#39; task to the Y (i.e. the deadline for both, the 1 ST and the 2ND tasks together must be 12 days).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table class="confluenceTable"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th class="confluenceTh"&gt;Alert x days&lt;/th&gt;
&lt;th class="confluenceTh"&gt;Task 2&lt;/th&gt;
&lt;th class="confluenceTh"&gt;Task 1&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;3&lt;/td&gt;
&lt;td class="confluenceTd"&gt;0&lt;/td&gt;
&lt;td class="confluenceTd"&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;6&lt;/td&gt;
&lt;td class="confluenceTd"&gt;X&lt;/td&gt;
&lt;td class="confluenceTd"&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;9&lt;/td&gt;
&lt;td class="confluenceTd"&gt;X&lt;/td&gt;
&lt;td class="confluenceTd"&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="confluenceTd"&gt;12&lt;/td&gt;
&lt;td class="confluenceTd"&gt;X&lt;/td&gt;
&lt;td class="confluenceTd"&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counter what's the best expression to use</title><link>https://community.appian.com/thread/94304?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 14:27:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:abb5ca1e-2367-4ab1-91af-67e152b9bd3f</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;I really think we may be encountering the X Y Problem; thank you Peter Lewis once again for this insight.&amp;nbsp; Let&amp;#39;s take a step back from your planned implementation and not just solve the implementation, but solve the underlying problem.&lt;/p&gt;
&lt;p&gt;What is your business problem?&amp;nbsp; It sounds like your business problem is that you want to have the task automatically reject if no one picks up the task for 12 days.&amp;nbsp; There&amp;#39;s a very simple way to do that which is built into tasks themselves.&amp;nbsp; It&amp;#39;s called an Exception.&amp;nbsp; In your case, if you&amp;#39;re trying to do what I think you&amp;#39;re trying to do, you would simply set up a timer expression, and tell the task to move on after 12 days.&lt;/p&gt;
&lt;p&gt;Please see if this is helpful:&amp;nbsp;&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/22.1/Process_Node_and_Smart_Service_Properties.html#exceptions-tab"&gt;https://docs.appian.com/suite/help/22.1/Process_Node_and_Smart_Service_Properties.html#exceptions-tab&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If not, you can provide more details of what you&amp;#39;re ultimately trying to achieve, and we might have an even better approach to the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Counter what's the best expression to use</title><link>https://community.appian.com/thread/94303?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 14:08:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8681f647-b54d-4f6b-940f-0e3859b2e901</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;If you want a counter that increments by one every day then the structure (the loop) you&amp;#39;ve put in looks correct, but your counter variable should be an integer type, and your expression should by in the form &amp;quot;myCounter+1&amp;quot; and is saved into &amp;quot;myCounter&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>