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)
Is there a workaround to this?
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.
Hope that helps
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)
If you need more details, let me know
Edit: Here’s the plugin: Orchestra (repeating group addon) Plugin | Bubble but it looks like it’ll need a button or similar to do the job as well
Thanks for the help!
I tried Orchestra but couldnt wrap my head around it haha
Sometimes I feel it easier to just bypass the no code environment do the good old programming approach
This topic was automatically closed after 70 days. New replies are no longer allowed.