Refresh Repeating Group API results

I am connected to a remote database via the API plugin.
When we add a row via api call to the database, the repeating group does nor update even if we make a new call to the api.
The only way to see the additional rows is to refresh the page.
I have a workflow so that when we POST data it then updates a state that the repeating group gets it list from but this does not work either, still needs a refresh page.

Does anyone have a solution?

Create a cache busting parameter (just add an unused field to the call where you pass current date/time).

2 Likes

Hi again Keith, I hope you’re well mate!
I’m sorry to ask but do you have a link or an example of this as I’ve been away from bubble for some time?

1 Like

Create a header on the call named “date” (or whatever) then place a date stamp (Unix) in the value. Initialize. You’ll need a plugin to watch for current time (I think the best is by mint flow), unless you know how in js. In your rg you’ll pass the date time from the plugin but ensure the date is formatted as Unix. This will refresh the call each time it’s updated.

Reason not to use the standard current date/time that bubble has is that it only grabs the value on page load.

Hope that made sense/helps.

3 Likes

Hey @morgan! I think @lantzgould has got ya covered, mate!

1 Like

thanks @lantzgould I appreciate that. What a shame Bubble can’t do this without a hack!

Hi, is this different from another hack I saw on this forum, where I add a fake header value to the api call and set it to Current Date formatted as Standard ISO.

Also, what is the name of the plugin. Thanks

Same concept. This isn’t difficult. You’re just busting the cache/making your get unique.

1 Like

thanks, I found the plugin. I added it to my app, but how do I convert it to Unix?

Just use the expression the plugin puts out. The date/time formatted as.

yea, i got the update to work. thanks.
I have some filters setup to filter the rg. Once I make the update to the data and reload the rg, filters no longer work. Upon further checking, If I run “clear list in rg” workflow, then old value shows up, which indicates that first Get is still in the cache and doesn’t get purged

Thanks, it works!