Hi,
I am trying to find out a solution to list the sum of unique Items from a table.
My actual need is, If I store the below data in the bubble database,

I would need to update/create a new table with a logic linking from above data as listed below

Can you please help me with this?
Thanks in advance
As far as I know, Bubble doesnât really do this. Youâd probably have to keep a separate field for âPensâ that gets updated anytime one of your customer gets their pen quantity updated. Iâd love to be wrong here!
Updating the rows with the sum would be possible via a bulk workflow.
Creating them in a workflow might be more difficult. Bubble doesnât much like âmassâ inserts.
Is this a one off populate of a table ? Or something you want to do every time ?
It is a dynamic update I would be using every time throughout various process and different modules. Hence I would need this logic to work to build my application.
We donât really support this yet. Once thing you could do is hardcode the different lines in the second table on a page, and then do a search for all things of type A whose product in âpenâ and then do â's quantityâ and take the sum of that list.
1 Like
Surely you can make a change to a list. Where the list is the list of all products.
And then sum up all the âorderâ quantities and update the total.
If you make sure your âorderâ thing has the product in it as a type it makes it a bit easier.

4 Likes
Thank you Very Much @NigelG âŚ
It works 