My situation: I have a Thing called Tool, which can consist of Things called Steps. I need to be able to reorder Steps. One way to do this is to add a Step field named Index and use it, but I wanted to find a way without additional DB overhead. I also know there’s a plugin for that, but it requires placing an Element on the page, and I don’t want that.
Here it is, as a GIF:
Hope this helps someone!
So you basically:
- Turn the “Steps” field into a Text, consisting of y’s and n’s (or any other chars, of course) depending on whether each Step is the current Step
- Remove everything after the first y (the current Step) from the Text
- Count the characters in the remaining Text
Yes, yes. That’s VERY weird. That’s Bubble for you ¯\(ツ)/¯
P.S. If you look closely, you’ll also find a weird way to implement conditionals (take a yes/no value, and format it as text).