This is a real head-scratched for me and I’m sure it must be possible in Bubble, but I don’t know how to do it.
I’ve got a database called “counters” with fields called “tool-id”, “user” and “counter”
There’s another database called “tools” with fields called “tool-id” and “time”
I need to run a query that sums the (time * counter) for every entry in the counters database for the user.
Is that achievable?
I don’t think I understood
Can you give us a pratical example?
Hard to tell based on given information but yes, it is possible.
You need to ensure the time and counter are numbers.
You would have a text element on a page, ‘Do a Search For’ counters, Created by = Current User, each item’s counter:sum + ‘Do a Search For’ tools, Created by = Current User, each items’ time:sum
Thanks for the reply - I’m not sure if that process above will solve it unfortunately, as I need to multiply the time (in tools db) by the counter (in counters db), and then sum all of these numbers. Does that help explain it a little more?
At the bottom of the dynamic data picklist there is “Calculate formula”
The bubble manual says
This source calculates more sophisticated numerical calculations, like loan interests, etc. Reach out to us if you need more options.
Which hides the fact that these features are not well documented
Pick “Calculate sumproduct” and it has two list parameters. It gives (list1 item1 * list2 item1) + (list1 item2 * list2 item2) + …