I have a repeating group. Each row within the RP has some price information.
In addition, there is a counter that dynamically changes the price depending on the counter.
I need to access each row’s price information from outside the RP to calculate the total sum. Bubble allows me to access the repeating group list information, but I’m unable to access the element within the RP from the outside to retrieve the price information. (The information in the second picture)
It looks like you’re basically setting up a shopping cart. There’s a pretty standard example built by the airdev team that shows how this is done.
The link to their editor isn’t working anymore but I have a copy of it.
there’s some other stuff in there so just ignore it. You want to look at the workflows for the shopping-cart-widget reusable element.
It seems that everytime the counter changes, the total price information is saved to the database. It doesnt seem like good practice to me as the UX will be negatively affect with extra lag on each change.
Was wondering if there’s another solution that does not requires any database change until the user finalize the shopping cart information. Meaning all the data manipulation is done on the frontend
You could use a state to hold the data for you, but likely would involve a button to update the data (update totals button) I beleive i’ve also seen a plugin that lets you access data from inside a Repeating Group but i haven’t tried it myself since i just use custom states for that kind of thing (perhaps you could use your counter buttons to update the state)