Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Differentiating between blank and zero

cancel
Showing results for 
Search instead for 
Did you mean: 
M-Pixel
5 - Automation Enthusiast
5 - Automation Enthusiast

It would be great if there were a way for a formula to differentiate between blank and 0 in a number field. Currently, cellname = "" and cellname = 0 both return true, whether the value is "" or 0.

I understand why this would be the default. It’s like truthy operators in JS (false == 0). But it would be useful if there were an option to circumvent that default behavior, and do a more strict comparison in a particular formula.

Potentially cell = BLANK() would return true for a blank value, but not for a zero value. Currently, equality comparison with BLANK() also returns true for 0.

Alternatively, it could be done with a new function - something like STRICTEQUALS(a, b).

6 Comments
Matt_Bush
Airtable Employee
Airtable Employee

For now, you can use COUNTA(cell) which returns 1 when a cell is non-blank (including zero) and 0 if it’s blank.

We may in the future consider adding an IS_BLANK() function since, as you pointed out, cell = BLANK() isn’t always equivalent and the COUNTA workaround isn’t very obvious.

M-Pixel
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks, glad to know there’s a way to do it already.

Mike_Johns
4 - Data Explorer
4 - Data Explorer

Thanks! I needed this workaround tonight.

Oli_Steadman
7 - App Architect
7 - App Architect

That’s a lifesaving workaround

Jeff_Drake
4 - Data Explorer
4 - Data Explorer

Thank you! This is exactly what I needed!

Partyborn
6 - Interface Innovator
6 - Interface Innovator

I also stumbled across this issue. Especially because Field != Blank() always returns true. I don’t think that Blank() should be used, as it is error-prone. Could you please introduce the Is_Blank() function?