You are viewing limited content. For full access, please sign in.

Question

Question

Forms date calculation suddenly causing error.

asked on July 12, 2019

We have a process that has been running for years where it calculates an expiry date based on a starting date and a given number of days.  For some reason, this field is causing an error on the review form when the user attempts to review and approve the form.  Yet, the form configuration does not show any error, however, in testing today, I now get this:

The Advanced Tab calculation on the Expiry Date field shows this and no changes have been made to this in years:   =Requested_Permit_Start_Date+IF(Requested_Duration_Period="",0,Requested_Duration_Period)

Any suggestions on where to go to look for the problem?  We did upgrade from 10.3 to 10.4 overnight last night, however, our user says this has been happening for a few weeks, not just today.

0 0

Answer

SELECTED ANSWER
replied on July 12, 2019

Try wrapping Requested_Duration_Period with the value() function. We had a bug in 10.4.1 that numeric values in list fields were being treated as strings and breaking calculations. We are releasing a hotfix for that issue, but to fix the calculation, try using value(Requested_Duration_Period). 

Also, is it possible the dropdown choices changed from "2" to "2 days"? That would break the calculation because 2 would be treated as a number, but 2 days would be an error. If you want to keep "2 Days", go into the list field and add values to each option. 

1 0
replied on July 12, 2019

Thanks, Jared.  It's looking more and more like it was the 10.4.1 update that is the issue.  The user admitted that he saw (noted!) the error only today and the other two instances that he thought was this problem could have been caused by something else.

My calculation is correct.  I just got off the phone with my IT and they tested with me and agreed that the calculation is working.  Even the form shows it is fine.

0 0
replied on July 12, 2019

Thanks, Jared!  We tried your "value" change and it now works!

=Requested_Permit_Start_Date+IF(VALUE(Requested_Duration_Period)="",0,VALUE(Requested_Duration_Period))

0 0

Replies

replied on July 12, 2019 Show version history

It looks like the value being used to calculate the expression is "2 days".  Should it just be "2"?  I would assume the field value should be a number, not alpha-numeric.

0 0
replied on July 12, 2019

Thanks, Kyle.  Turns out it WAS the 10.4.1 update, even though the user first reported that this was not the first day he has had this problem.

0 0
replied on January 6, 2020

INTERESTING UPDATE:  Suddenly, we have this problem again.  While looking at the notes in these posts and seeing that the issue was relating to the 10.4.1 update, I realized that we just updated to 10.4.2.  So I wondered if our old formula might work.  Sure enough!  I plugged in the formula we used prior to this LF Answers issue and it worked!  Our date calculation is working again with the original formula.

 

0 0
replied on January 7, 2020

We changed the behavior back to the original behavior where numbers in the list are treated as values and any alphanumeric entries in the list are treated as text. We added an additional option in 10.4.2 to set the list as text type to account for the case with long multi-digit ID numbers that need to be treated as text. 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.