The best I can find on this is a post from over TEN years ago saying this is “not too far away” yet here I am today not only recognizing this hasn’t been changed, but also noticing there isn’t a resource from bubble clearly explaining how to achieve the most basic math concept–managing the order of operations—in bubble in dynamic data.
To require users to create custom states and have multiple steps in a workflow to store values and operate on each one by one making your own hack for an order of operations seems borderline negligence, or am I unreasonable?
Or am I overlooking something where there is a resource (outside of scanning forums) to try to learn how to manage order of operations?
To fix the issue, I need to refresh my screen. Bubble should force a page refresh when the user checks/unchecks that parentheses setting to address the issue.
AND NOW, YET AGAIN, I run into another issue. The parenthesis do not automatically set up how I want them. And get this—to no one’s surprise that knows how bad bubbles’ resources are—there isn’t a resource to help explain how to enter dynamic data in such a way that the parenthesis appear as you want them.
Why?
It is three years after chatGPT. That means writing is easy. Why isn’t bubble generating helpful prose in the manual. As this information isn’t out there, AI can’t help you either, because there isn’t an explanation anywhere.
Thanks. The tacit premise is that “want’ is guided by underlying assumptions, and those assumptions should be informed by something, but that SOMETHING DOESN’T exist in a resource from bubble.
If I knew how the logic worked for the parenthesis appearing, they would then appear how I want them as I’d enter in information in such a way that the logic would drop them in as anticipated.
I understand it can be tricky at first, but you’ll get the hang of it. When you’re using parentheses, notice that the dynamic expression editor allows you to continue your expression either inside the parentheses or outside of them.
According to bubble help, the parenthesis appear as how bubble will interpret the expression. You’re stuck. They don’t help other than showing you how bubble will treat what you enter.
You have to hack your way around using custom states and multiple steps in workflow.
So ten years later we’re left with no upgrade to the platform to address basic things.
You probably just don’t understand exactly how to use the parenthesis feature and like @rpetribu said, you need to get used to and understand how it work. I will say that parenthesis features solved probably 95% of case where we needed to use state or hidden field. There’s a few case that could request to continue to use workaround.
If you share your case, we can probably help you understand how to set it correctly using parenthesis feature.
Your topic is about the order of operations. And I understood that you were referring to the order in which Bubble interprets information within the dynamic expression editor which, as Jicci pointed out, has practically solved all the issues in that regard.
But yes, it’s not a mathematical formula editor. You’re absolutely right about that.
The hack I use (for simpler calculations) is to place the number inside an “Arbitrary text” and then convert it to a number. At least you no longer need to keep using thousands of custom states to store variables.
The example of @rpetribu is without dynamic value, but if you have dynamic value, you probably don’t need to use arbitrary text.
Bubble would have give you options to set the calculation using the correct more available and you should see something like:((dynamic1/dynamic2)+(dynamic3/dynamic4))
Docs pretty much cover how they work. Then it’s pretty straightforward to use parenthesis IMO. Just takes some getting used to like the others have said.
It’s true that it being hidden in settings and not the default is a questionable decision. Tbh without this feature I’d have stopped using bubble a long time ago