I found that the repeating group updates in real time if there are changes in the database elements.
Otherwise those 2 methods mentioned above work well.
However, they are not working in my case, where the repeating group content needs to change due to privacy rules.
I have a functionality on my app where a user can block another user and the repeating group in question needs to look at the privacy rules in order to update it’s content.
This seems to happen only if the page is refreshed.
Does anyone know another way to solve this, without refresh?
I spent an hour trying to solve the problem of updating information inside a repeating group. My context is I receive data via an external API. It seems like it’s solved. This is how:
0. Create a custom state of your repeating group. Make it list of Texts.
In the API section change change the “Use as” field to Action
In Workflow set an event Do every X seconds (I set 30 secs). Then, you need to create an action that would save all the information from API to a custom state of your repeating group.
Select the custom state full of your information as a Data Source for your Repeating group.
You can add any separators or any other operator if you want to.
Basically, that’s it. Every 30 seconds your data goes from API to a custom state of your Repeating Group. And from this moment the Repeating Group will automatically update data inside itself.
for anyone reading this, I have some useful information about a bug when displaying a list of API “Types” in a repeating group.
Bug:
If you don’t leave the data source field empty on the repeating group of API “things” then using the “clear list” or “display list” actions won’t do anything.
Workaround:
Leave the data source blank. When the page is loaded, use the “display list” action. The repeating group will respond. Then you can use the “clear list” action on a button (or anywhere else) and it will now respond. I believe this is what is causing so much confusion for many users. I don’t recommend modifying an API call just to workaround this (like others have suggested)
Edit:
This works, but after you “clear list” then “display list” again the API call won’t actually fire again - it will use the cached result. Only “real” solution here is to create your own API call in a plugin …
I noticed that if I had a data source that has a “do a search for” I got weird behavior…Here’s how I solved it:
I use the Floppy plugin an rehydrate the list of unique IDs for entries returned by algolia ( @keith)
Then on the RG I filter the data source with the list of entries returned by Floppy (this is fine since all the data to be filtered is already available client side)
I have a RG that has a Do a Search For things, filtered by a date range. Its purpose is to display user-submitted reports on a real-time dashboard. Dynamic real-time updates to display new reports in the RG is a must.
As discussed by others in this thread, RG does not update when new thing is created in the database. I was using a table before and that worked fine, so I expect the RG to work the same as both are elements whose sole purpose is to display dynamic lists of data.
This seems to be a huge oversight from Bubble, and should be considered a bug. The whole point of RGs is to have them update dynamically. Refreshing the page is not an option, because the user wouldn’t know that something is changed in order to refresh the page.