Best way to get Blank?

Sometimes in tables I want to put a Blank value in place if there is not a proper value that should go there.

For example, here is an example inventory table that says when our product arrived, but if the product has yet to arrive I just want to have Blank in the table. Blank is nice because it is generally not considered in math formulas (like Sum, Average, etc.).

Right now, my hacky way of doing that is with Last(List()) since Last returns Blank if the List is empty (so does First, but First(List()) doesn’t have the same ring to it).

There is currently no Blank() formula, but is there a better (more transparent) way to do this right now?

It would be really nice if by default when an If() formula is filled out and one of the parameters is omitted it just returned Blank (perhaps it could automatically fill in Blank() for transparency sake)

2 Likes

Hello @cnr,

I typically just use “”, as in :
If(thisRow.Status="arrived", Modified(thisRow.Status), "")

image

Now I am wondering; is there some use case where that causes problems?

Thanks!

Yeah I used to do that, but then it’s formatted as a string. If you have it in a Date formatted column then it will add the red indicator to say there’s a problem (iirc).

Also, I imagine if you were to Count() the number of dates it would count the empty string (giving 3 rather than 2).

But I don’t have Coda in front of me so I can’t confirm these, maybe you can give it a try?

Hmm, well it appears to work correctly at the moment - no error flag reguardless of format, and count()/average() work as expected and only consider 2 values. If you reference the cell directly it returns “Blank” and not an empty string.

That being said, I’d prefer a safer “Blank()” formula that doesn’t leave any question as to what it would return in all situations :slight_smile:

Thanks for checking that out.

Now I think that violates my expectations. If I wanted to count the number of columns with strings in them I would think that it should include empty strings.

I would think that an empty string should remain an empty string…

Blank() would be nice.