Refreshing Repeating Group

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?

Thanks!

@snowsnow

Unfortunately not.

I reached out to bubble about this, and they said to refresh the page.

Create a phantom “now” header in your api call and make it current date and time formatted iso

Then clear list, display list.

1 Like

@doug.burden
Hi, if this a reply to my last message: I’m not using an API call but just showing data from the database…

Ok. Have you tried clearing list and displaying the new list action ?

@andy.i

I see… I thought to filter the data in the repeating group, without relying on the privacy rules, so I setup my repeating group like this:

However, the data in the repeating group still doesn’t get refreshed using the 2 methods that you mentioned.
It still requires a page refresh…

I guess the repeating group keeps using a cached version of the “current user’ s Blocking” list ?

@doug.burden
Yes, just tried now, it still doesn’t refresh the repeating group…

I found a way to make it work.
I realised that I can filter the posts in a more simple way:

and now the repeating group gets refreshed after using the action “reset data” on the group that contains the repeating group.

I just hope that filtering all the posts from the people on the current user’s blocking list won’t slow down the app too much…

EDIT: after further testing, I released that the repeating group gets refreshed also without resetting the data of the parent group.

1 Like

Still nothing? The Clear list → Display list way doesn’t work, either any other method

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.

  1. In the API section change change the “Use as” field to Action
  2. 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.

  3. Select the custom state full of your information as a Data Source for your Repeating group.
    image
  4. You can add any separators or any other operator if you want to.
  5. 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 …

Good luck!

2 Likes

@jonah.deleseleuc thanks a ton for sharing - super useful

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 (:heart: @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)

Gif is the final result:
fixed searches

3 Likes

this works perfectly, thanks!

Same issue here.

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.

shouldn’t have to upgrade to growth plan as a work around!