Missing, extraneous, or mismatched parentheses, depending on whether you fix it by adding one or taking one away.
The following should parse as a valid formula, but I didn’t step through it to make sure it does what you want.
IF(
OR(
DATETIME_DIFF(
TODAY(),
{Created Date},
'days'
)<365,
DATETIME_DIFF(
TODAY(),
{Last Substantial Contact},
'days'
)<365
),
"Covered",
"Uncovered"
)
(You either needed to add ‘(
’ before the first DATETIME_DIFF()
or remove the one after the first 365
, and you needed to remove one of the two closing ')
's.)
You can copy-and-paste that formula, line-breaks and indentations included, into the formula field, and Airtable will parse it properly. When writing complex formulas, it can be helpful to write them in a third-party editor — personally, I use Notepad++, because it makes matching parentheses easy — but there are hundreds of others to chose from. If you enable the option to translate tabs into spaces most such editors support, you’ll find you can copy-and-paste both to and from Airtable’s formula configuration fields and have the spacing and indentation retained. (Airtable will collapse whitespace when you save the formula, but it’s stored internally and will be restored when you copy-and-paste back into the editor.)
Missing, extraneous, or mismatched parentheses, depending on whether you fix it by adding one or taking one away.
The following should parse as a valid formula, but I didn’t step through it to make sure it does what you want.
IF(
OR(
DATETIME_DIFF(
TODAY(),
{Created Date},
'days'
)<365,
DATETIME_DIFF(
TODAY(),
{Last Substantial Contact},
'days'
)<365
),
"Covered",
"Uncovered"
)
(You either needed to add ‘(
’ before the first DATETIME_DIFF()
or remove the one after the first 365
, and you needed to remove one of the two closing ')
's.)
You can copy-and-paste that formula, line-breaks and indentations included, into the formula field, and Airtable will parse it properly. When writing complex formulas, it can be helpful to write them in a third-party editor — personally, I use Notepad++, because it makes matching parentheses easy — but there are hundreds of others to chose from. If you enable the option to translate tabs into spaces most such editors support, you’ll find you can copy-and-paste both to and from Airtable’s formula configuration fields and have the spacing and indentation retained. (Airtable will collapse whitespace when you save the formula, but it’s stored internally and will be restored when you copy-and-paste back into the editor.)
Wow V_WAM_Hall thanks a lot. This really works, awesome!
And the tips with the editor are spot on… fully agree on this as well.
Marc