Hi,
Coda Basics is definitely my category!
So, to stick to the theme, why • this work:
[button]“DISABLE IF”
thisRow.Category = “A”
• but this doesn’t work:
[button]“DISABLE IF”
thisRow.Category.IsBlank()
wait, wait, except that I have just discovered, by doing a last test just before posting this question, that if I pick manually “blank” in my “Category” Column Select list, the “DISABLE IF” works!
Which means that the problem is not in the formulation of “DISABLE IF”?
(I am thinking while typing this post…)
Are you distinguishing between null (“”) , blank (" ") and initial? I do not know whether “initial” is a valid concept in Coda, but it refers to the contents of a field before anything has been assigned to it. Which is not the same as blank. Or null.
Hi Piet,
thank you for your answer.
That’s just what I was wondering, a bit empirically!
When you say null (“”) , blank (" “), do you mean that null (”“) is equal to nothing, no item at all, and blank (” ") to an empty space?
I’m not sure I understand, and I feel like this is where my button problem lies:
If(thisRow.Category.IsNotBlank(), ’ ', ‘’)
As for “initial”, I don’t understand what it’s about. To me, initial means “first letter of a word”…
This still comes back to my main problem, I think, with Coda, which is, not (only! about understanding the formulas, but the correct syntax to make the elements of the formulas work. I feel there is a lack of this in tutorials, videos, various resources, etc. Especially when you are a real beginner in this field, and you discover this way of “programming” these elements: how to articulate and organize things correctly, and to understand the precise role of signs (., =, “”, “”, etc.)…
In short, the basic but universal syntax!
In Coda blank (" ") means that cell you are referring to doesn’t have any value, nothing is selected (if its select list) or no text is entered (not even empty space) if its for example text field.
Basically cell that has " " as value will return True on .isblank() formula.
As for button disable, not sure what exactly is your setup, but formula thisRow.[Column name].IsBlank() definitely works for disabling buttons, I use it all the time. It will disable the button if that cell is empty.
And now everything (including my DISABLE IF, which wasn’t the problem) works.
But i have to admit that i don’t get fully how that works about ’ ’ and ‘’ (or " " and “”)…
Hey @Gabriel ,
Forget the if() formula, just enter thisRow.category.IsBlank() in the disable if field and your button will disable if the category is empty.
And please make a dummy doc showing an example of your problem and share it, that makes is to much easier to troubleshoot your problem(s) and help you out with sample code.
There’s no special meaning of " " (a text with one space). It is NOT blank.
"" (an empty string, nothing between the quotes) — now that IS blank.
Are you saying you’re seeing a blank cell but it doesn’t match against the .IsBlank() function?
Then the cell is perhaps not really blank, and you need to examine that (and fix the root cause, not slap random duct tape formulas over it)
Are you saying that my post (just above yours) is not correct? I think the “disable if” button option was not used correctly, all the other stuff is, as far as I can see, not relevant. Or am I mistaken?
Sorry, The label should have said “blank space” rather than “blank”. What I wanted to highlight the difference between “” and " ", which is not visible on screens.
Thanks to all of you, @joost_mineur, @Piet_Strydom, @Paul_Danyliuk
I now understand a little better.
As for the rest, @Paul, I have no choice but to perform (many) tests, and see what works or not… To understand and assimilate the logic.
" " Is a space. In the ASCII table of characters, it is represented by the decimal 30. It is what you get when you hit the space bar on you keyboard.
“” Is nothing. It is not zero, it is not a blank space. It is the absence of a code in the ASCII table of characters.
I usually test for both null using .isblank as well as for something else in many of my IF formulas in Coda. There are times when you only need to know if something has data or does not have data but if you need to know what that data is and blank is also a possibility, then testing for both .isblank as well as something else will prevent you from having to worry about formulas not working properly.