Help with Expression. "(" and ")" always wrong

Hi all,

is there a way to enter a formula with “(“ and “)” that are on my own place to be?

I want to insert a formula like:
… + 0) * (5/60)
and bubble’s editor is doing:
… + 0)
* 5) / 60)

just an example.

I’ve a lot of those things to handle..

any ideas?

thanks

jupxi

1 Like

This is because you are not using the correct “more” option. When you use parenthesis, you will have multiple “more”, select the correct one.

yes, I know. but it doesnt work at all

Share a screenshot please

how to enter this:

This Player’s metal - (50 + (Search for Building:first item:level * 25))

I tried to create the formula like this
This Player’s metal - (50 + (Search for Building:first item:level * 25))
Didn’t work out, but you could do it like this

image

Although you would have to treat -1 values

Seems like there is a bug on the parenthesis editor, see if you can try this way @jupixy

This would be a nice Plugin : extended Formula Editor for bubble.

1 Like

First multiply/divide then add…

I understand your issue. Actually, the order in Bubble remain important mostly when you enter a manual/literal value because theses values will not give you access to “more” options directly.

I think that using a state or arbitrary text will let you put the parenthesis at the right place because you will get a more option right after theses options (state or arbitrary-text:converted to number)

You don’t need a plugin for that, but there’s some limitation when using literal value in expression and at the beginning of expression.

I’ve tried using Bubble’s built-in parentheses builder too and ran into problems. It seems a bit buggy when the formulas get complex.

One option is the Toolbox Plugin, which gives you an Expression element where you can write formulas more directly. It’s definitely more reliable if you’re working with a lot of parentheses and complex math.

I think the parenthesis builder has some problems the way it is. It caused a bug in another area that was unrelated. Maybe it was just me…but I tried for a few hours

It was just you :stuck_out_tongue:

The main issue is more related to literal expression/manually entered value than parenthesis.

1 Like

Probably was me…

I spent probably 3 hours one night trying to work with parentheses.

Even tried to use AI to help.

I got it to work, than, ran into a bug it caused with another issue.

I’m still learning little by little, I’m sure you know more than me :grinning_face:

I gave up on the whole parentheses thing and just went another route to get what I needed done.

My overall impression was the whole parentheses thing was under-developed and needed work :grinning_face:

1 Like

You was probably not part of the new “expression” composer that Bubble choose to turn off because there’s was too much bug, but the expression parenthesis got all expected feature with this new composer. Actually, it not that easy to use (but when you learn how to use it, you will not come back). However, the expression composer have a limitation with manual entered number and this is the main issue from my point of view that remain. However, but I have not tested, since there’s a new “step” to enter a litteral value and we need to click enter or select it, maybe this is now solved so more operators can now be applied after a litteral value directly, and not just after the whole expression.

AI will not help you.

And I think Bubble doesn’t really have good documentation about parenthesis.

1 Like

I knew how to calculate the formula using code…

so I thought I would turn on the parentheses builder in the backend.

That was the beginning of my problems…

I now have it off.

Thanks for your explanation. Maybe I’ll try it again :grinning_face:

1 Like

You can use “Arbitrary text” converted to number.



1 Like