Handling Delays and Loaders with External Databases in Bubble

I am using an external database, which results in some delay in displaying content. Therefore, I would like to add some loaders to visually indicate to the customer that content is being loaded.

I am using a Group Focus as a reusable element to display the content. I have tried using “add a pause” and custom CSS to display the content. However, this pause causes an issue: if I click on a row in my table and realize I clicked the wrong one before the content finishes loading, the “add pause” in my workflow results in a new window opening on top of the existing one. Essentially, the current window doesn’t close before a new one opens. So it looks like the whole app is freezing.

Any tips?

Any reason why you’re using the add a pause action?

Just to avoid content being displayed before it is fully loaded.

Got it, so there’s no definite way of knowing when the data from your external DB gets loaded in Bubble? Which is why, I’m assuming, you’re using the add a pause action?
Ideally, if there was a way, you could let go of the add a pause and instead just reset the popup whenever the user clicks a new record in the table

Not that I know of. That’s why I’m using the “add a pause” action.

Perhaps it helps to load external data in a group and from there populate custom states. Do this when the page load workflow runs.

The idea is that on page load, external data (best to use a view for most important data) is fetched when the data group is empty. After that it will populate the custom states and those custom states can be used in your app. Now, when data changes and you are sure it has changed you set the custom state. Now make sure when the workflow where data is changed finished you do a refresh of the data group so that new data from external database is fetched. This will now be loaded into the custom state and all is good.

There is 100% a way to know whether or not your data is loading or not. You can shoot me a DM if you want a custom solution but likely whatever “external DB” you’re using (if it’s hosted via cloud), will have this built in for you.

1 Like

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