No Error In Formula Syntax Though Field Is Empty

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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.
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
What field type is this field. Is it a formula duration field?
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb
It is a numeric Formula
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
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())

)
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb
This did it! Thank you!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
Ideally, it should have given you a syntax error.  You were calculating a Duration, but the field type was numeric.