I use quite a lot of boolean variables in my app and use toggles to switch them on or off. However, in the beginning they are empty.
For my user, it’s important to see the difference between variable is ‘no’ and variable is empty. I want to use a condition for this, but the only conditions that are available are is ‘yes’ and is ‘no’.
I know that I can change all the variables to text types and use dropdowns, but I hope there is a quicker solution.
I tried that already…when the variable is empty in the database the debugger gives for the condition ‘variable’ is no : Yes. So I think it interprets an empty value as no, which would be a huge bummer for me
A boolean only has two states, on/off, yes/no, true/false. I’m afraid you are getting caught in the ‘oh, crap, why did I set it up like that?!’ position that every single one of us have been in
It sort of does that internally, but if you format a boolean as text, then no (null no) comes out as blank. Although not empty it seems, which would have been a nice workaround.
I think it probably does but I just tied myself in knots trying to tell Bubble that if it is No as in Null and not No as in No then tell me it is empty
And creating a list of No and Yes is much harder than I had imagined.
Note that for at least two days, if you had defaults (like yes, no, nothing) when initializing your variables, then the value was null instead of Yes No. As Nigel @NigelG mentioned, it does not produce the expected result. So the best way is to say < > of “Yes”.
Since null is no, i solved my specific case by turning “show image” into “hide image” such that all pre-existing nulls are now no, and I can match for that as I wanted it by default, and only future items are set as yes will be hidden. Won’t solve every case.