Basic Math in bubble

Hi, hoping someone can solve easy enough,

I have two input boxes: Price & Quantity
Price feeds in from the database, Quantity I input and change manually
I have another input box called Total - I want that to update whenever I change the quantity.

I tried this expression in the “placeholder”, I also tried it in the “initial content”

Price * Quantity (dumbed down as Price feeds from database)

  • and it doesn’t recalculate - help please and thank you

Neil

Use the toolbox pluggin.

Yes, possible in bubble. May be your input content format is not in integer / decimal.

Try below link
https://test-test-1.bubbleapps.io/version-test/simple

Thanks guys - I can get it to work for two static input fields calculating into another one (integer on all).
I change one field to be dynamic feeding off database (number field) - and it then doesn’t work.
Its a real head scratcher.

Solved for those reading - as a new user I couldn’t tell you why it didn’t work, but I have a workaround.

Rather than point the calculation at the two fields, i.e. Quantity * Price, I changed the formula so that the formula is: Quantity * Dynamic field from database directly. A more direct approach and for whatever reason it worked.

This topic was automatically closed after 70 days. New replies are no longer allowed.