[SOLVED] Database Currency Total

Hi Bubblers,

image

I am currently working on a personal page to keep up to date with what I’m spending money on! (Wow organised!), so far so good, I am able to input the name of the item and it’s price, all cool. I’ve managed to make a box that also tells me how many items are currently in the database, as seen in the photograph, there is 2.

What I am currently unable to achieve, is in the total box, the total price of all items. Does anyone know how I can achieve this? I’ve played around for around an hour now trying to get it to work and have also tried maths.js, or maybe I’m being a bit thick!

You don’t need maths.js.
You just need to collect all item (using a search for example) and select the number field you have set for the amount (you should have set a number field… if not, this is a mistake). When you will have select the field, use :sum
Will look like Search for expense’s amount:sum

Hi!

Thanks for the quick response! I’m on a night shift so trying to pass the time, and also sorting this project out would make my life so much more easier! When trying to attempt what you’ve said, I can’t quite work out how to do so (maybe because my brain isn’t in gear) Attached is a photo of me trying to do what you’ve said

The search box on the left, is to set a constrain. Delete the ProductPrice.
Go in the right box Initial content, you should get an option “more” when you will click on search. You will select the ProductPrice, you will get “more” again and select :sum

You’re a legend mate! Cheers, you’ve made this young developer a happy chap!
image
Happy bubbling :slight_smile:

1 Like