Hacking Bubble

The Converting Datatypes Hack

Ryan Roberts
2 min readSep 8, 2016

You may have a number but you need to save it as text. Or how about a text to a number? Or maybe even boolean to a number or text? What do you do?

We have a few options. First the boolean is the easiest one. You can just use the :formatted as function and set your static values for True or False, now you have successfully converted your data type. But what if you wanted dynamic data for the conversion. What if the value isn’t just True or False, what if it’s user data, or an address you want to save?

There is no apparent option for this, so what do you do?

The Input Form. Any data type allows data from the Input Form. So if we just pass our data along to the Input Form first, then from the workflow call the data from that Input form, we’ve just successfully converted any data type imaginable. Well, maybe not a file, or an image, or a main data type, or any kind of arrays. But who cares, you got your text converted into a number.

You are happy right?

If you’re not, leave a comment below. If you are, leave a clap.

Hacking Bubble is a series on how to make Bubble do things it probably wasn't meant to do. And sometimes, putting the code back into the code-less.

Don’t miss out on the latest Bubble content by signing up here.

--

--