<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121049.aspx</link><pubDate>Fri, 31 May 2019 19:58:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121049</guid><dc:creator>mrosenstein</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121049.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121049</wfw:commentRss><description>Thank you so much for all of your help! I would not have been able to figure it out on my own.</description></item><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121039.aspx</link><pubDate>Wed, 29 May 2019 23:13:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121039</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121039.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121039</wfw:commentRss><description>Good detective work! Try this one - I moved the total hours from a default value to an action on the BegDateWN / EndDateWN fields - on the second rule where you are setting the work days. You&amp;#39;ll want to test this carefully in the browser tho - sometimes browser forms can be a bit more persnicketty, so something that is working in preview may still fail in the published form.</description></item><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121038.aspx</link><pubDate>Wed, 29 May 2019 22:16:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121038</guid><dc:creator>mrosenstein</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121038.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121038</wfw:commentRss><description>Thank you so much for your help! From what I can see, the error seems to result from the variable &amp;quot;totalhours&amp;quot; which calculates a value using &amp;quot;workDays&amp;quot; to calculate total working hours. Do you know the best way to go about doing that without getting an error for number of calculations exceeding the maximum limit?</description></item><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121037.aspx</link><pubDate>Wed, 29 May 2019 21:26:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121037</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121037.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121037</wfw:commentRss><description>I&amp;#39;ve gotten you a little closer, I think - save the attached file locally, right click, select Design and then you can preview, etc. The main diff I saw between your form and the sample you linked is that your form is a SharePoint list form, so you don&amp;#39;t have plain date datatypes - even if the list is set to only display dates, it will store date/times. So I had to modify any reference to the firstday and lastday fields to use substring-before(field, &amp;quot;T&amp;quot;) to return the just date part. However, I was still occasionally seeing the calc error - I just don&amp;#39;t have time today to see if I can discern a pattern. Maybe you can try some different date combos and see if you can see when it fails? :-)</description></item><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121036.aspx</link><pubDate>Wed, 29 May 2019 20:09:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121036</guid><dc:creator>mrosenstein</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121036.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121036</wfw:commentRss><description>The variables within this form that I&amp;#39;m working with to calculate the business days is &amp;quot;firstday&amp;quot;, &amp;quot;lastday&amp;quot;, &amp;quot;BegDateWN&amp;quot;, &amp;quot;EndDateWN&amp;quot;, and &amp;quot;workDays&amp;quot;. I think the issue arises with BegDateWN and EndDateWN. When using the design checker, I get a warning which states &amp;quot;The custom control has duplicate attributes or elements. Please check the XSL to ensure there are no duplicate values.&amp;quot; which I believe corresponds to Rule 2 within those variables.</description></item><item><title>Re: Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121035.aspx</link><pubDate>Wed, 29 May 2019 15:26:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121035</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121035.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121035</wfw:commentRss><description>I don&amp;#39;t know of any specific pointers on what you may have in your form rules that is causing this - but I&amp;#39;d be happy to take a look at it to see if I can help you. You can attach a copy of your form under the Options tab in a reply.</description></item><item><title>Calculating Business Days Between Two Dates</title><link>https://www.infopathdev.com:443/forums/thread/121031.aspx</link><pubDate>Fri, 24 May 2019 20:15:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:121031</guid><dc:creator>mrosenstein</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/121031.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=121031</wfw:commentRss><description>I am attempting to follow the alecpojidaev instructions to calculate the amount of working days between two date pickers on my own form using this link: https://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/ . However, after copying his rules directly from his form and running it on my own form, I continue to get errors. 

The error received when I choose a date on my form is:
An error occurred in the form&amp;#39;s rules or code. The number of rule actions or the number of calls to the OnAfterChange event for a single update in the data exceeded the maximum limit.

The rules or code may be causing an infinite loop. To prevent this, ensure that the rule action or event handler does not update the data which causes the same rule action or event handler to execute.

Is anyone aware of a quick fix to remedy these errors?</description></item></channel></rss>