<?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>set next action date to friday by default?</title><link>https://community.appian.com/discussions/f/general/17216/set-next-action-date-to-friday-by-default</link><description>i want to set the next action date as friday always , suppose today is friday , the action date should be today. 
 if it is some any other day,the action date should be friday. please tell me how do implement it.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: set next action date to friday by default?</title><link>https://community.appian.com/thread/67885?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 09:15:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc7af8be-f88c-437f-8768-4032b06fafbc</guid><dc:creator>dineshd0001</dc:creator><description>&lt;p&gt;&lt;a href="/members/shikhat0001"&gt;ST07&lt;/a&gt; Please check with the below code snippet for this calculation.&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt; /* To get current Weekday ie Sunday=1,monday=2...*/&lt;br /&gt; local!weekDay: weekday(&lt;br /&gt; today()&lt;br /&gt; ),&lt;br /&gt; /* To do calculation if its on saturday */&lt;br /&gt; local!addDays: 6 - local!weekDay,&lt;br /&gt; /* Then add those days to cuurent Date */&lt;br /&gt; local!addDays1: if(&lt;br /&gt; local!addDays &amp;lt; 1,&lt;br /&gt; - (&lt;br /&gt; local!addDays&lt;br /&gt; ) + 5,&lt;br /&gt; local!addDays&lt;br /&gt; ),&lt;br /&gt; /* I f current day is friday it returns same day*/&lt;br /&gt; if(&lt;br /&gt; local!weekDay = 6,&lt;br /&gt; today(),&lt;br /&gt; today() + local!addDays1&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>