Date Calculations with Conditions - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Date Calculations with Conditions

Last post 03-30-2012 11:53 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-30-2012 11:00 AM

    • Tanya
    • Not Ranked
      Female
    • Joined on 05-27-2011
    • Canada
    • Posts 12

    Date Calculations with Conditions

    I'm trying to figure out how to use the addDays() function within rules. The reason for this is I require a different number of days to be added depending on the result of another field.

    I have a StartDate, CompletionDate, RenewalPeriod and RenewalDate field.

     I need the RenewalDate to have a different number of days added based on the result in RenewalPeriod.

    If RenewalPeriod says Annual, the addDays rule should be addDays(CompletionDate, 365)

    Renewl Period is Bi-Annual, the add Days rule should be addDays(CompletionDate, 730)

    etc.

     However, when I enter this information into the rules, I get no response in the field. Anyone have any ideas?

     

    Thanks

  • 03-30-2012 11:08 AM In reply to

    Re: Date Calculations with Conditions

    Hi - what field are you adding the rule to? Rules fire when the field they are on changes.... It looks like you would want this rule on the RenewalPeriod field and on the CompletionDate field. If that's where the rules are now, and they aren't firing, it could be because the value of the RenewalPeriod field is not meeting your conditions (case could be different, it could be bound to a drop down and have a different value than display, etc).

    Hilary Stoupa

  • 03-30-2012 11:36 AM In reply to

    • Tanya
    • Not Ranked
      Female
    • Joined on 05-27-2011
    • Canada
    • Posts 12

    Re: Date Calculations with Conditions

    I have tried the rules in RenewalPeriod, and also in RenewalDate (seperately). I've checked the conditions and they appear to be fine (matching case and spelling). I will try putting the conditions under both CompletionDate & RenewalPeriod and see what happens. will get back to you.

  • 03-30-2012 11:47 AM In reply to

    • Tanya
    • Not Ranked
      Female
    • Joined on 05-27-2011
    • Canada
    • Posts 12

    Re: Date Calculations with Conditions

    The rules aren't firing at all.

  • 03-30-2012 11:53 AM In reply to

    Re: Date Calculations with Conditions

    If you attach your form under the Options tab, I can take a look - usually if rules with conditions aren't firing it is a problem with the conditions - you could try removing those and see if the rules fire when you expect and then work from there...

    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.