Calculated Fields

The project I am working on needs calculated fields. For example if you have a column with the quantity of a product sold, and a column for the price of that product, a third calculated column would equal price * quantity.

I cannot see anyway to do this in bubble.

Is there a simple way to get this done?

Hello Sam,

I answared a post a couple of days ago where I posted some screenshots of how to perfom simple and complex calculations on columns and pretty much anywhere. You can calculate entire lists of data or just simple fields.

Go ahead and check it out since its pretty straight forward to perform calculations on database fields with the expression builder.

One easy way is to use input fields – Create one input field (Input A) for quantity… another (Input B) for price… then the third one (Input C) is “Input A * Input B”.

If you want to get cheeky, you can style the input field to remove the border… So it won’t actually look like an input field.

Also, if you don’t want the user touching the total, just check “Disable this input”.

1 Like

I second this,

I often set this up when I am creating Line items for invoices, where Quantity x Unit Amount = Total

I set up actions for “when input value is changed” on each of the quantity and unit amount inputs and these then calculate the total.

:link: Connect with me