Help

Color record based on formula field has ERROR condition

Topic Labels: Formulas Views
Solved
Jump to Solution
371 2
cancel
Showing results for 
Search instead for 
Did you mean: 
ni5ni6
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a formula field that calculates a value (results a number) based on a lookup field (e.g. a date). 

When the lookup field is empty due to a missing input, formula field results with a NaN or ERROR.

In that case, I want to highlight RED color to that record so operators understand that they should fix the missing input. 

Unfortunately, there isn't a way to enter a color condition statement such as "WHEN formula field IS ERROR, SET COLOR red".

Is there a solution for this? @airtable 

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

Try to add an IF statement to the Formula field. This formula checks whether Date is input.

IF({Date},"TRUE")

To check how the Lookup value is a date, it can be checked with this formula.

IF(NOT(ISERROR(DATESTR({Date}))),"TRUE")

Normally, you only need to determine how empty it is, but if the date is taken from a string, you may need to check both.

By adding the IF statement above, you can set the record color to red when the formula field is empty.

 

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

Try to add an IF statement to the Formula field. This formula checks whether Date is input.

IF({Date},"TRUE")

To check how the Lookup value is a date, it can be checked with this formula.

IF(NOT(ISERROR(DATESTR({Date}))),"TRUE")

Normally, you only need to determine how empty it is, but if the date is taken from a string, you may need to check both.

By adding the IF statement above, you can set the record color to red when the formula field is empty.

 

ni5ni6
5 - Automation Enthusiast
5 - Automation Enthusiast

Understood. It's a decent workaround. Thank you