It would be very helpful to have a new formula function akin to Excel’s IFERROR, or even add an optional fourth parameter to IF as a branch to be taken if an error occurs in evaluating the expression. e.g., IF(Flogical argument],]true branch],]false branch],]error branch])
Too late for @Luke_Thompson, I’m sure, but for anyone else who may come across this: I was just seeking the same solution and found the ISERROR function, which can be paired with IF for an IFERROR equivalent.
Too late for @Luke_Thompson, I’m sure, but for anyone else who may come across this: I was just seeking the same solution and found the ISERROR function, which can be paired with IF for an IFERROR equivalent.
Hi Nate, can you share the actual formula you used? Appreciate it.
Hi Nate, can you share the actual formula you used? Appreciate it.
Welcome to the Airtable community!
You can see the documentation for the ISERROR()
function in the formula field reference. Here is an example usage
IF(
ISERROR( {num1} / {num2}),
"you are probably dividing by zero",
IF(
{num1} / {num2} > 1,
"got an answer bigger than 1",
"got an answer less or equal to one"
))
Welcome to the Airtable community!
You can see the documentation for the ISERROR()
function in the formula field reference. Here is an example usage
IF(
ISERROR( {num1} / {num2}),
"you are probably dividing by zero",
IF(
{num1} / {num2} > 1,
"got an answer bigger than 1",
"got an answer less or equal to one"
))
It causes extensive calculations to be executed twice :exploding_head:
Definitely, Airtable should have IFERROR(value, value_if_error)
Example of formula I have because of lack of IF ERROR:
IF(
ISERROR(LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*"),
"",
LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*")
It causes extensive calculations to be executed twice :exploding_head:
Definitely, Airtable should have IFERROR(value, value_if_error)
Example of formula I have because of lack of IF ERROR:
IF(
ISERROR(LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*"),
"",
LEFT(TRIM({Full Name TL}), SEARCH(" ",TRIM({Full Name TL})) + 1) & ".\n*" & REGEX_EXTRACT({Funding Information Translated}, "City: (.+)\n") & "*")
That’s just part of the nature of Airtable formulas. It’s a bit of a pain, but it’s what we have to deal with for now. If you don’t want to repeat the calculation in the formula, you can move the calculation to a different field and then just use the field name twice. Of course, that technique has its own issues as well.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.