# Discussions

View Only

## No Error In Formula Syntax Though Field Is Empty

• #### 1.  No Error In Formula Syntax Though Field Is Empty

Bronze
Contributor
Posted 06-29-2017 15:02
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.

• #### 2.  RE: No Error In Formula Syntax Though Field Is Empty

Top
Contributor
Posted 06-29-2017 15:08
What field type is this field. Is it a formula duration field?

• #### 3.  RE: No Error In Formula Syntax Though Field Is Empty

Bronze
Contributor
Posted 06-29-2017 15:11
It is a numeric Formula

• #### 4.  RE: No Error In Formula Syntax Though Field Is Empty

Top
Contributor
Posted 06-29-2017 15:14
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())

)

• #### 5.  RE: No Error In Formula Syntax Though Field Is Empty

Bronze
Contributor
Posted 06-29-2017 15:16
This did it! Thank you!

• #### 6.  RE: No Error In Formula Syntax Though Field Is Empty

Top
Contributor
Posted 06-29-2017 15:18
Ideally, it should have given you a syntax error.  You were calculating a Duration, but the field type was numeric.