Ridiculus syntax

I have a flow on the backend that validates if the calculation B is within the range of A ±X%.
I currently do it with Ultimate Toolkit - Simple Cache.
Cache Value A
Cache Value B
Cache 1
Cache the difference (X%)
And using those 4 elements I create the condition only when

B >= A*(1+X%) and B<= A*(1-X%)

But I feel this is really dumb. What is the best practice there?
I read somewhere that the workflow can have a 1 as a parameter to make it faster - but as passing a number is fast, passing the calculation isn’t which will make doing backend WF obsolete in that case.

Hey, did you resolve this? I’ve got some ideas that could help you streamline this backend workflow.

Not clear on the question.
But it seems simple enough to solve with Bubble’s inbuilt dynamic expressions.

It is solved, I just wonder if it’s optimal or not.

The question is - if the way I do it is optimal or I should go for something else. I sometimes do “whatever works” approach, but also like to know the optimal paths.

Well the case is in dynamic expressions you cannot make comparison like:
result of step a is equal or smaller than 1 - A. As after 1 you are not allowed to use dynamic values within the parenthesis of the second element of is equal or smaller.

Of course you can go -A + 1 but that is really stupid that after a number I cannot do the calculation for dynamic value.

That’s why I buffer all data and later just use result of step 1, 2, 3, 4.
Otherwise I cannot build this equation.
I really do not understand why it is limited here.

Ok I would try breaking it up using arbitrary text like brackets.

Lets say you wanted to do:

A * (B+C)

You could do A * arbritary text :converted to number

And inside the arbritary text put:

B + C

I know the example is different but the idea is the same.

1 Like