Displaying true/false for a yes/no column in javascript

Hi! I’m trying to output a boolean value in javascript (true/false) in a workflow item. Unfortunately, I’ve only been able to get the value to output as “yes” or “no”. Does anyone have any suggestion on converting that to true or false?

Thanks!

Just to be clear: Those values ARE true and false.

The yes/no data type in Bubble basically IS the JavaScript boolean type with a goofy name.

Now, when you convert a Bubble boolean to its text representation, the default is “yes” for yes (true) and “no” for no (false). But this is just one reason why we have the :formatted as text option.

For boolean expressions, this gives you the following pop-up where you can set how the thing looks for true (yes) and how it looks for false (no). Enjoy my ugly screencap:

You’ll note that you can do something completely static like make yes’s text representation “true”, or even use a dynamic expression as I’ve done above. And, yes, these can be nested… It’s very powerful.

For more on booleans in Bubble, see my video at the following URL. At the 8’40" mark or so I get into :formatted as text and booleans.

This topic was automatically closed after 70 days. New replies are no longer allowed.