I'm trying to make a Shoe store app and right now I have a working Cart (Uses TinyDB). I want to be able to get the Total Price of all the items from my list which is in Index 10. But i don't know how to get all the items in the list and then filter it to only show the Total Price. Is there anyway to make it so that whenever i press the "update" or "add" button, It gets the total price from all items on the list and adds them together?
Then it will automatically set the label "TOTALPRICENUMBER" to the Total Price
I notice in your blocks that you use two different TinyDB tags for your Cart:
OrderNo
Order No
Do you see the difference?
Considering that the value you store there is a list of items and quantities for a single Cart, consider instead using 'Cart' for your tag.
Also, your global variable List should also be renamed for clarity to describe its purpose, to hold all the items in the current Cart. I would call it CartItems to hint that it's a list, and that it holds the items in this Cart.
Here is a value procedure you can use to pull column 10 from your cart: