Hello bubble forum!
Apologies for posting about this topic again. I think I can provide more information now and what I’m trying to do. I’ve been attempting this for almost a day already but still no luck. Please help
I could be way off here, but based on info from your other post, shouldn’t the count be a count of the items in the Current User's cart filtered to the current cell’s item? Then, as the user adds/removes an item to/from their cart, the count would update automatically. In other words, the plus/minus icons shouldn’t update the count… they should add/remove items to/from the user’s cart, and the count should take care of itself because it is based on the number of items in the cart.
Again, I probably wouldn’t be using a custom state for the count. I would be counting the items in a user’s cart or doing a constrained/filtered search for medicine-cart items and counting those items. As I mentioned, I don’t think the plus/minus icons should be changing the count. Those icons should be adding/remove or creating/deleting things, and you just need to count those things.
Hello @mikeloc
Tried this for the minus icon to delete a medicine-cart item on my appdata. It does the job but the count doesn’t change in real-time unlike when I click the plus icon
Hmm, I think you need another constraint on the search because right now, it looks like you are deleting the first item in the search, and that item may or may not have been created by the current user… unless you are doing the current user thing in the filter. What is the filter doing? I think you might be able to add Created by = Current User as a constraint on the search and then delete the filter, and you might be good to go.
I think I did it! Thanks a lot, Mike. Now I’m off to displaying the cart contents. Hoping I will not find it necessary to seek help this time around 