How make a condition for -ve and +ve of the same calculated number number?

Hi i am trying to make a condition where an error message is shown under a certain criteria.

Some numbers are entered in the text boxes. A block calculates a value from some of those numbers and shows it. For example value shown = x+y+z.

Now i need to setup a condition where the error message is shown when (x+y+z) > [+ve (10xA +5)] and [(x+y+z) > [-ve (10xA +5)]

I need some advice on how to set up this +ve and -ve condition for the same derived value?

You can use the AND logic block to connect to conditions together. But how can x+y+z be > ve and > -ve? Did you mean to turn around one of those inequalities?

If you’re stuck, post a screenshot of what you’ve tried and someone can probably help you fix it.

I dont have a condition setup yet for that. I was stuck at how to.

I can explain a little further so you get the idea.

The app has a few text boxes for some fuel figures from different tanks. Once a calculate button is clicked the app calculates the various uplift figures and discrepancies. I have managed to do that much. Now the issue is as follows

Eg: discrepancy is calulated by app

The limit discrepancy can be is within (+ or -) y

Now y= 0.0072(A) + 537.5
Where A is one or the text box values in the app called final fuel on board.

If lets say (A) = 100000
So if we get discrepancy as +2000 from the app. Based on the “y” calculation, discrepancy is > y so error message shown.

But the same must be true of the discrepancy is -2000 as well. This is where i am having a problem. Coz this y equation is only gonna give me a +ve value so its easy to put a condition for the +2000 (for eg). Ut how do i also set it up for the -2000?

What you’ve written in the two posts are contradictory. They can’t both be true. You’re saying on the one hand:

If D (discrepancy) > y then show error
If -D > y then show error

But for any value of y less than D, that is going to show an error, because if something is less than -D, it’s also less than D.

Then you also said that D can be within +/- y. So I would think that means D > y > -D.

But that’s different! In that case, y has to be between -2000 and 2000. So… which is it?

1 Like

Hi Aswin,

I think this is what you mean. Assume the
PL = +ve Limit is 10 and NL = -ve limit is -10 then
if (x+y+z) > 0 & (x+y+z) > PL) Error Out
if (x+y+z) < 0 & ABS(x+y+z) > ABS( NL)) Error Out
ABS means absolute value
image
& means “and”
image
All the above conditional checking can be easily done with Thunkable