Forum Discussion

JordanBeatty1's avatar
JordanBeatty1
Qrew Captain
8 years ago

No Error In Formula Syntax Though Field Is Empty

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.
  • 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())

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