Skip to main content
Question

No Error In Formula Syntax Though Field Is Empty

  • June 29, 2017
  • 0 replies
  • 22 views

I'm using the following formula:

If(DayOfWeek([Date of Injury])=6, [Date of Injury] + Days(11) - Today(),  DayOfWeek([Date of Injury])=0, [Date of Injury] + Days(10) - Today(), [Date of Injury] + Days(9) - Today())
_[Date Of Injury] is a date field. Essentially, there are 7 business days to make a phone call from the [Date of Injury]. So this formula is to do a countdown for the days left to call. If [Date Of Injury] is a Saturday or Sunday the countdown begins on Monday. Though, even when the [Date Of Injury] Field is filled in this calculated field is remaining blank.

What field type is this field. Is it a formula duration field?

  • Author
  • Registered
  • June 29, 2017
It is a numeric Formula

Then wrap the whole thing in "ToDays" and see if it works

ToDays(
If(DayOfWeek([Date of Injury])=6, [Date of Injury] + Days(11) - Today(), 
DayOfWeek([Date of Injury])=0, [Date of Injury] + Days(10) - Today(),

[Date of Injury] + Days(9) - Today())

)

  • Author
  • Registered
  • June 29, 2017
This did it! Thank you!

Ideally, it should have given you a syntax error.  You were calculating a Duration, but the field type was numeric.