<?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>How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/discussions/f/data/30402/how-to-use-calworkdays-with-a-customfielddatediff-function</link><description>I want to calculate number of working days between two dates (record field) and use the output as a custom field in the record. Getting stuck while trying to use calworkDays in a!customFieldDateDiff function. Can anyone please help</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/122914?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 13:50:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:980f3288-2c48-480c-9e12-45e15b197b3a</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This is so confusing !!! I have a hard time understanding all this logic. When I work on cases, I care about the one that is open for the longest time. Filtering for a case that is exactly open since 4 days, seems weird to me. But that is just my personal opinion.&lt;/p&gt;
&lt;p&gt;So, can&amp;#39;t you just not do any calculations, but adjust the filter value in a way it includes non-working time? So, on a Monday, I want to see cases that are open for more than 4 days. This means that I actually have to filter for &amp;gt; 6 days, right? Using a!subtractDateTime, I get exactly that date.&lt;/p&gt;
&lt;p&gt;So I transfer the calculation from DB into the filter attribute.&lt;/p&gt;
&lt;p&gt;This would make sense in the way I understand your explanations. But I might be completely wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/122900?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 11:25:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c603345-d953-44d2-a1ee-10df008794e8</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Got it Stefan but for us Due date would be today&amp;#39;s date or the date when the filter is being applied...So is it possible to store the current data in record as a field which would keep updating itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/122899?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 11:21:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f8d2be14-53aa-47fc-ab66-ac81d53a613a</guid><dc:creator>Shikha</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;Any suggestions on how this could be achieved? Due date calculation is different scenario which will not wok here.&lt;br /&gt;&lt;br /&gt;We cannot store business days open field also while writing the data as well because it is a runtime function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;calworkdays func works but only for displaying open days in grid column , how to apply business day search filter on top of that grid list ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/122890?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 08:37:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6589ea8a-3c36-4516-9c11-218cb744b0bd</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In my applications, I store the due date, calculated at the time of writing the data. Storing a number of hours/days requires you to do that calculation at runtime. which gets you in the trouble you are.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/122888?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 07:58:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0200908d-aced-49e6-a79d-05b615e425dd</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Hey there is an update in the use case,&amp;nbsp;&lt;span class="ui-provider ed ayv ays ayw ayx ayy ayz aza azb azc azd aze azf azg azh azi azj azk azl azm azn azo azp azq azr azs azt azu azv azw azx azy azz baa bab" dir="ltr"&gt;If I filter by Business days=4, then this would mean that only the cases which have been open for 4 business days would come in the filter result and if the case is created on weekends then it should not take the weekend while calculating the business days for ex.&amp;nbsp;If case is opened on Saturday, and the filter is applied on Tuesday, then the business days open for that case would be 2 i.e. Mon &amp;amp; Tue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="ui-provider ed ayv ays ayw ayx ayy ayz aza azb azc azd aze azf azg azh azi azj azk azl azm azn azo azp azq azr azs azt azu azv azw azx azy azz baa bab" dir="ltr"&gt;&amp;nbsp;&lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp; Is there any possible way to solve this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="ui-provider ed ayv ays ayw ayx ayy ayz aza azb azc azd aze azf azg azh azi azj azk azl azm azn azo azp azq azr azs azt azu azv azw azx azy azz baa bab" dir="ltr"&gt;Also this filter is to be done on an interface which would then populate the case details from the record.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="ui-provider ed ayv ays ayw ayx ayy ayz aza azb azc azd aze azf azg azh azi azj azk azl azm azn azo azp azq azr azs azt azu azv azw azx azy azz baa bab" dir="ltr"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121629?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 13:12:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d8ca08ad-1cb5-49e7-98b0-eaa031f85dfb</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Hi Stefan, any possible solution??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121263?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 10:57:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9346774c-32a2-4cb2-aca9-952917562a2b</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Can you please explain this with any code snippet&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121262?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 10:56:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6b42fdf-8ac0-411c-8667-6e12c8c5284a</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;a!queryFilter(&lt;br /&gt; field: &amp;#39;recordType!{95b6b60f-3baf-445b-8ac8-ad1c6aabc820}CMS Cases.fields.{d29ddafb-ab89-4da7-8e24-13e050f348cd}createdOn&amp;#39;,&lt;br /&gt; operator: &amp;quot;between&amp;quot;,&lt;br /&gt; value: {&lt;br /&gt; datetime(&lt;br /&gt; year(today() - ri!busniessDaysOpenFilter-1),&lt;br /&gt; month(today() - ri!busniessDaysOpenFilter - 1),&lt;br /&gt; day(today() - ri!busniessDaysOpenFilter - 1),&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; datetime(&lt;br /&gt; year(today() - ri!busniessDaysOpenFilter ),&lt;br /&gt; month(today() - ri!busniessDaysOpenFilter ),&lt;br /&gt; day(today() - ri!busniessDaysOpenFilter ),&lt;br /&gt; &lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; applyWhen: a!isNotNullOrEmpty(ri!busniessDaysOpenFilter)&lt;/p&gt;
&lt;p&gt;This is how I have done it now it is working properly except it is taking weekends also.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121223?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 11:53:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7540ebfd-a089-4992-99f9-3b3a411a9f9c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Then, why not take that number entered by the user, add it to the current date respecting business days and store that. Then this would work like a due date.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121218?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 11:20:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:699cd171-2292-4abe-b8e9-8d6cdc6d2f4e</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Can this be done using&amp;nbsp;&lt;span style="font-family:inherit;"&gt;a!queryRecordType in the interface itself.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121216?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 11:18:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81cba9f2-e56e-4891-98cc-949dbfcd98b9</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;okay stefan, is there any other way round&amp;nbsp; , The exact use case is that user will enter number of days a case is open in the interface, then we&amp;nbsp; need to query all the cases present in the record which are open for the entered number of days excluding the weekends and holidays based on &amp;quot;created On&amp;quot; date-time type field which is present in record.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example if the user enters 5, then we need to return all cases which are opened for 5 business days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121126?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 11:32:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c6ad286-3187-4b5d-8ef5-fd3dd18ee1b9</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I think this is not supported at real time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/121119?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 10:49:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0177ebf0-6859-49c8-8856-d9bb1729f824</guid><dc:creator>parikshitd918726</dc:creator><description>&lt;p&gt;Hi Stefan thanks for your response but in my use case I need to calculate workdays between a record field and today&amp;#39;s date.. So cant do it in sync-type custom record field can you please suggest&amp;nbsp; any possible solution to do this in real time custom record field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use calWorkDays with a!customFieldDateDiff function</title><link>https://community.appian.com/thread/120806?ContentTypeID=1</link><pubDate>Mon, 23 Oct 2023 06:42:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86c018d0-774f-460a-b8dc-e4b5ea006961</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You can use the&amp;nbsp;&lt;span&gt;calworkDays() function in a sync-time custom record field.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>