I’m not figuring out the best way to do this.
I have a table with a column called “Finished” and the field will either be blank, or it will contain the date that I finished. It came from a 3rd party imported template so that’s just the way they designed it.
In another view, there is a set of filtering dropdowns for various columns attached to the table so that I can do multi-select filtering. The one for “Finished” is True and False, as in, “Is if finished, yes or no”.
If they select both true and false, then it should show all rows. If they select neither, it should also show all rows. Only if they choose either true or false should it filter to the empty cells or dated cells.
My problem is in the filter logic. I assume that an if() function is what I need:
if(finishFilter.ContainsOnly(true), thisRow.[Date Finished].IsNotBlank(), if(finishFilter.ContainsOnly(false), thisRow.[Date Finished].IsBlank(), {WHAT DO I PUT HERE???}))
The if() function doesn’t allow you to not have the “else” block, so I’m not sure what to put for that spot. Or if I’m really using the correct function at all.
How would I essentially make the ‘else’ statement say “then show anything” or “show all”?
When I look at the operators, there isn’t one for a “show anything”. It’s greater than or less than and equals or not equals or is blank or not blank etc. But what would be “can be any value”?
I know the answer is easy but I haven’t tried to code anything in Coda for a while so it’s not clicking how best to do this filter. Because “true” and “false” doesn’t relate directly to “empty cell” and “has a date”.
I know I’ll smack myself as soon as one of you tells me the obvious answer to make this filter work easier.
I just want them to select false for empty cells and true for cells with a date, or both or none to see everything and not filter it.