Force Table refresh

Hi. :blush:

Do anyone know how I can force the table element to refresh a list without refreshing the entire page?

I need this because I use an external database and don´t want to loose the path where the user are in my app.

Thanks!

BR, Xtine

You can use backend workflow to achieve that; you need to be on a paid plan to use tis feature though

I am on a paid plan. How can I set up this WF?

A simple way would be to add a refresh icon to the page and add a when clicked Workflow event. In that event, add a Workflow action associate to Display list in Repeating group.

The element in the Display list action would be your repeating group and the Data source would be the same search that powers the repeating group.

But I am not using a repating group to show my list. I use the table-element. :slight_smile:

Table element?? :no_good_man:t2::no_good_man:t2::no_good_man:t2:

Anyway you could send the “list” to a hidden repeating group and have the table use the RG as the datasource. Tables are limited, not as well documented or tested as repeating groups. Buyer beware.

1 Like

I can try to send it to a RG.

I actually set up a RG now and added “Clear list” and “Display list” to the workflow after editing a record. It still doesn’t update. I have to do a hard page refresh to get the table updated… So frustrating.

I would cut my losses and use the RG as the Table. Even though it’s a bit more work for the design side, I think it’s going to be better in the long run for ya

1 Like

This might be because of how Bubble caches API requests. Once the API request is made Bubble will not call that endpoint (I’m assuming your external database again) even if you try to force it because as long as Bubble is concerned - none of the parameters have changed, so what’s the point of making the same call again?

A workaround is to add another field in your API connector called “date-time” (or whatever) and in the Workflow tab or Editor add “Current date/time: formatted as Simplified extended ISO”. This will update a “dummy” parameter every second and so Bubble won’t cache your request and actually make another API call.

This is entire suggestion is based on an assumption that you are using an API Connector to get external data and you’ve set it up via “Get data from an API” or via workflows :smiley:

3 Likes

This is what I do too☝️Just update it when you want to, not every second since it will cost too much WU.

3 Likes

Wow I totally missed the comment “external database” because I got caught up hating on the Table element. :point_up: this is the solution 100%

3 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.