Thanks - I still couldn’t get it to work with your suggestions. However, I wrapped the whole formula with an IF(ISERROR({original formula}),"",{original formula)), which is kind of ugly, but it works.
Thanks - I still couldn’t get it to work with your suggestions. However, I wrapped the whole formula with an IF(ISERROR({original formula}),"",{original formula)), which is kind of ugly, but it works.
Oh, I’m sorry; I completely missed this first time through.
The ERROR()
message is coming from the first test against {Due Date}
, when you check to see if TODAY()
is after {Due Date}
; you can’t have a blank value there. You simply need to reorder your IF()
statements to test for an empty {Due Date}
first, like so:
IF(
{Due Date}=BLANK(),
'',
IF(
{Completed?},
'Completed',
IF(
IS_AFTER(TODAY(),{Due Date}),
'Late',
IF(
IS_AFTER(DATEADD(TODAY(),2,'days'),{Due Date}),
'Coming Due',
'In Progress'
)
)
)
)
(And, yes, you can paste this indented code into the Formula field and have it work; in fact, I copied it from a Formula field. I typically write all but the simplest of formulas in Notepad++ , taking advantage of its automatic indentation and parenthesis matching, and afterwards copy-and-pasting them into Airtable. When I modify a formula, it goes through the process in reverse: While Airtable collapses the indentation on saving the formula, when the formula is opened for editing, the indentation is restored. So I mark-and-copy from the Formula field (Ctrl-A Ctrl-C
) and paste it into Notepad++.)
Oh, I’m sorry; I completely missed this first time through.
The ERROR()
message is coming from the first test against {Due Date}
, when you check to see if TODAY()
is after {Due Date}
; you can’t have a blank value there. You simply need to reorder your IF()
statements to test for an empty {Due Date}
first, like so:
IF(
{Due Date}=BLANK(),
'',
IF(
{Completed?},
'Completed',
IF(
IS_AFTER(TODAY(),{Due Date}),
'Late',
IF(
IS_AFTER(DATEADD(TODAY(),2,'days'),{Due Date}),
'Coming Due',
'In Progress'
)
)
)
)
(And, yes, you can paste this indented code into the Formula field and have it work; in fact, I copied it from a Formula field. I typically write all but the simplest of formulas in Notepad++ , taking advantage of its automatic indentation and parenthesis matching, and afterwards copy-and-pasting them into Airtable. When I modify a formula, it goes through the process in reverse: While Airtable collapses the indentation on saving the formula, when the formula is opened for editing, the indentation is restored. So I mark-and-copy from the Formula field (Ctrl-A Ctrl-C
) and paste it into Notepad++.)
Makes sense - thanks!