The Boolean data type in Bubble is called “yes/no”.
It is just like the Boolean type in JavaScript.
(An empty Boolean evaluates as “no”.)
Active should be a field of type Boolean (“yes/no”), not text.
If you want a drop down to read as True and False that’s fine. When “True” is selected, set Active to yes. When “False”, set Active to no. (In the same way you set any Bubble value.)
A checkbox (built in or custom) is also a good interface for Boolean values.
BTW, as I’m fond of mentioning, toggling (negating) a Boolean in Bubble is possible, though it is not obvious at first.
To flip/flop a Boolean value, evaluate the expression:
Boolean is “no”
If Boolean is no, this evaluates to yes. If Boolean is yes, this evaluates to no. So “is “no”” is the equivalent of not(Boolean) or !Boolean in other languages.
Thanks for your input Keith, but I was after a solution that will help other people in the ‘don’t need to be a coder’ target market that they can refer to in the future as a solution they can follow step by step, when they enter the keywords true or false in the forum search field.
I found a solution and will add screenshots a bit later. It still adds a lot of extra workflow events that I was hoping to avoid but I’m not sure there is any way around this.
Your question inspired me to make a video. I did figure out a (kind of funky) way to make a dropdown work as you might expect with Boolean (yes/no) values. I also demonstrate several other interfaces for displaying and/or modifying Booleans in Bubble. Also covers the proper way to negate (invert, or “apply the Boolean not operator”) a yes/no in Bubble.
Awesome video, one of the best Bubble videos I’ve seen! Yes - I was trying to use a dropdown to avoid using the default checkbox and didn’t want to download a plugin just to style it. Now I can use a tick icon.
I’m still a bit murky about the inverse Boolean because the “is no” is throwing me off. At the moment I’m just copying your inverse Boolean without really understanding it.
Does it mean something like ‘When the value in the database is not equal to the frontend value, then make it the front end value, otherwise don’t change it’