addDays() using field is not working - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

addDays() using field is not working

Last post 04-26-2018 07:55 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-26-2018 05:50 AM

    addDays() using field is not working

     I have a form that has a data connection to another list where a list of certifications are kept. There is a column that has the number of days the certification is valid. In my main form when the user selects the certification, it looks up the number of days it is valid and populates a field called DaysValid.

     There is a field called ReceivedDate and another field called ExpirationDate.

    When the user selects the date they received the certification, there is an action that should set the ExpirationDate field:

     addDays(ReceivedDate, DaysValid)

    But the ExpirationDate field then shows ERR?

    I have found this issue on several other forum posts but on one it was not solved and on the other it had to do with a repeating table which is not the issue here. Any help would be greatly appreciated! 

    Filed under:
  • 04-26-2018 07:55 AM In reply to

    Re: addDays() using field is not working

    I think it could be that when the days valid is returned to your form, the value has a decimal point in it. I found in a test form that if I used a field with a decimal for my "DaysValid" equivalent, I had and ERR? too! You could try using the round function or substring-before to remove the decimal. In your rule, you could have a condition - if the DaysValid contains a decimal, use a formula that handles for it, and then have a second rule for the case where it doesn't. Does that make sense?
    Hilary Stoupa

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