Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays. - InfoPath Dev
in

InfoPath Dev

Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays.

Last post 05-18-2016 07:20 AM by ToniHil. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-16-2016 10:26 AM

    Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays.

    Please note the BeginDate such in Alec's form is my Now Date which is near bottom of form. I originally designed this on business hours and then the requester changed it to days. The EndDate such in Alec's form is my Start Date. SO essentially the form loads with Now. The calculation between Now & Start are what determines the number of workdays. My end date is not really in the mix except it is used to schedule +2 hours from Start Date & Time. The main field that changes for all the rules is the Request Category. Very complex form using some of Alec's calculations between dates.. have everything working but I have multiple rules built in. It works perfect through certain dates.. but not always. I have nothing to debug this to see where it is potentially getting hung up from running the rules. Any help would be immensely appreciated!!! Here is a summary of the rules for this form. All of these are prompting field (request category) to change based on selection. 1. If the field workday is 2 days or less (this is this business day + next business day (for Friday, it would count Friday and Monday)) – field Request Category = “Director Approval” 2. If the field workday is equal to 3 days (this is this business day + next 2 business days) – field Request Category = “Exception Request” 3. If the field workday is equal to 4 days or more – field Request Category = “New” 4. These are the exceptions to the above “New” category= a. If workdays = 4+ and time is before 8 am or after 5 pm (please see StartTimeComparison field and 8 o clock and 5 o clock fields to have this read correctly) = Request Category = “Exception Request” b. If StartDate equals “Saturday” or “Sunday” and workdays is greater than 2, the Request Category = “Exception Request”  For reference, enter the Start Date and Time in the date time picker to see how it works (upper left hand corner of the form). o The fields at the bottom of the form: workdays and StartTimeComparison and Day of Week (for Saturdays & Sundays) are the fields the Request Category rules are written to. PS if there are issues opening my form or preview, please let me know as this is my first time posting. Also here is a rundown of the errors - but there are no errors given- its just not giving the correct request category after a certain date. For example: 1. The form works perfect on any time frame today (5/16) – (5/26). 2. Then on 5/27 – 6/26 = Director Approval always… the only 2 options for this day since it is that far in the future should be New and/or Exception Request. It seems to be getting stuck on the Director Approval rule. 3. Then for 6/27 – 7-11 = Exception Request always. It seems to be getting stuck on the exception request rule instead of reading New 8am – 5pm. 4. Then beginning again on 7/12 – it works perfectly again. If I close out of the form and choose one of the days it is errors same as written above, the same thing occurs - same dates do not work. I also tried changing the time to 11:59:59 on the day before it errors and it still reads correctly. So it the issue has to do with the date in the date picker not the time. The workdays which calculates the time time between reads correctly and this is what the New, Exception Request, and Director Approval all trigger off of. So there is no correlation between the rule itself and this…?? So confused.
  • 05-16-2016 05:42 PM In reply to

    Re: Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays.

    Hi ToniHil and thanks for posting.

    This is why we included a DateDiff function it our qRules plugin. :)

    That's guaranteed to work for filler forms and non-O365 browser forms. And we include an hour of support.

    Please let us know if you'd like help with qRules Date Diff.

    Otherwise, guessing someone needs to debug your expression... :) 

    Patrick Halstead
    Project Manager at Qdabra
  • 05-18-2016 07:20 AM In reply to

    Re: Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays.

    I was able to re-write my rules to make this work! Thanks!! Solved on 5/16/2016.
  • 05-18-2016 07:20 AM In reply to

    Re: Rules appear to stop calculating after a period of time... infopath days between dates excluding weekends & holidays.

    I was able to resolve this later that day! Thank you :)
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.