How to stop bubble from using - & +

Hello fellow bubblers im building a marketplace app where i need to minus current quantity from a products stock but because of bubble using integers im getting negative numbers in my product stock.

What are the workarounds for this?

Thank you.

Why don’t you just make a conditional?

When subtraction + total < 0 etc…

how will the conditional change the operators that bubble uses during the calculations?

What are you trying to do?

im trying to minus current products quantity - the products total stock which makes the stock a negative number.

:format as

Then format it as a number with no decimal places and use parentheses for negative numbers.

You sure? Wouldn’t total stock - product quantity make much more sense?

I still don’t understand what you’re trying to do?..

12 - 195?

of course that will give a negative number?..

2 Likes

it’s product stock - purchased qty, not purchased qty - product stock

Thank you everyone for all the replies, i forgot how integers worked.

2 Likes

As you do :joy:

3 Likes

Comment of the year :trophy:

1 Like