Been trying to figure this out and then found this thread. Seriously there’s no brackets in Bubble? What is the logic?
I guess it’s just from left to right.
Do not hesitate using the Toolbox plugin. That’s the lonely rational solution for now about this.
Any Plan to add this ?
I ran into this to calculate an order total, where the formula was 20x + 30y = total. In my case, I converted this to (20x/30 + y) * 30. The parentheses are for clarity, obviously bubble doesn’t implement them, but you can see that the PEMDAS operation has been converted into a serial method that will result in the same answer. In your case, we have a - b/5 where you want b/5 calculated first.
a - b/5 = SUM
5(a-b/5) = 5SUM
5a - b = 5SUM
(5a-b) / 5 = SUM
so 5 * Input 1’s value - Input 2’s value / 5 would accomplish serially what you assumed using PEMDAS conventions.
Running into the same issue, trying to make a simmple page to count money and generate a total… How is this not integrated/???
+1 Please add this feature.
Does anyone how is the status of this one and the parenthesis feature?
@Bubble seriously ?
Please, please, please, put something in place natively. It’s been more than Five Years!
@Bubble we’d really like some feedback/follow up on that kind of things
+1 for the parenthesis from me
+1 - nothing worse than having to use hidden inputs to store temp items for the most basic of calcs.
Bubble, will we ad this feature please? I’m trying to make changes to a list of things and need parenthesis priority please!
yes it event prevents the use of the new data triggers !
Thank you for your continued solutions and workarounds for adding order of operations to your applications! We recognize this is a long-asked-for feature, and it’s certainly on the team’s radar in the future. If you haven’t come across it already, we recently added an Ideaboard to share what you would like to see us build and upvote ideas from other users. For example, if in the “Submit a new idea” form, you enter “order of operations” as the summary of the idea, a suggestion for this and more advanced arithmetic capabilities will appear beneath the form so that you can upvote the suggestion. Our product team regularly monitors the Ideaboard to inform our roadmap, and you’ll see ideas in the list that we have marked as “In progress” or “Solved.” We would love to continue hearing and building your suggestions and encourage the community to keep taking advantage of the forum and this new resource.
@Emmanuel Could you please add the parenthesis?
And if I can be granted a second wish, it would be a more intuitive responsive design feature.
This feature is important. I’m struggling with a formula: Calculated Value = 1 - UI Value. The editor doesn’t like that I’m starting with a 1 and I can’t seem to enter a variable and then change it to a 1.
@jeremy.shubert that’s got nothing to do with order of operations - order or operations only applies when there’s division and multiplication, or when using brackets.
The issue you’re describing is entirely different and, whilst slightly annoying, is easy to overcome.
Consider setting a custom state (number) somewhere on your page with a default value of 1.
Then, for your calculated value, use that custom state value (i.e. 1) - UI Value.