Airtable formulas don’t currently support variables. The formula structure you showed is pretty much the way it’s done based on the example you provided. It can be optimized a bit further, though. Here’s what I came up with:
IF(
AND(Type, NOT(
SWITCH(
Type,
"TypeOne", AND(Name, Description),
"TypeTwo", Name
)
)), "
Some fields are not filled out!"
)
Here’s how that breaks down, starting on the inside.
The SWITCH()
function is optimized for creating specific output based on what’s found in a single field. In this case, I’m checking the {Type}
field. If it contains “TypeOne”, it will return the result of checking the contents of both {Name}
and {Description}
(if you put just a field name in a test like that, it will return True if the field is non-empty, and false if empty). For the “TypeTwo” option, putting the field reference alone works because of what’s happening next.
Once the SWITCH()
function is processed, it goes to the NOT()
function, which inverts that result. In other words, it’s effectively processing this:
NOT(AND(Name, Description))
if the type is “TypeOne,” and
NOT(Name)
if the type is “TypeTwo”. In short, if we don’t have data in the required field(s) for the chosen type, then NOT()
will return True; otherwise it will return False.
Outside of that, we’re using AND()
to test if a) there’s actually a selection in the {Type}
field, and b) we don’t have all the data we need for that type. That is passed back to the outermost function, IF()
, and the warning message will print if both tests in that AND()
function are True.
Here’s that formula in action:

Airtable formulas don’t currently support variables. The formula structure you showed is pretty much the way it’s done based on the example you provided. It can be optimized a bit further, though. Here’s what I came up with:
IF(
AND(Type, NOT(
SWITCH(
Type,
"TypeOne", AND(Name, Description),
"TypeTwo", Name
)
)), "
Some fields are not filled out!"
)
Here’s how that breaks down, starting on the inside.
The SWITCH()
function is optimized for creating specific output based on what’s found in a single field. In this case, I’m checking the {Type}
field. If it contains “TypeOne”, it will return the result of checking the contents of both {Name}
and {Description}
(if you put just a field name in a test like that, it will return True if the field is non-empty, and false if empty). For the “TypeTwo” option, putting the field reference alone works because of what’s happening next.
Once the SWITCH()
function is processed, it goes to the NOT()
function, which inverts that result. In other words, it’s effectively processing this:
NOT(AND(Name, Description))
if the type is “TypeOne,” and
NOT(Name)
if the type is “TypeTwo”. In short, if we don’t have data in the required field(s) for the chosen type, then NOT()
will return True; otherwise it will return False.
Outside of that, we’re using AND()
to test if a) there’s actually a selection in the {Type}
field, and b) we don’t have all the data we need for that type. That is passed back to the outermost function, IF()
, and the warning message will print if both tests in that AND()
function are True.
Here’s that formula in action:

Thanks, Justin! It’s sad that Airtable doesn’t yet support variables in formulas but your code is indeed a more optimized way to solve this for now. Thank you!