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?