Running query after switching page

Hi everyoneđź‘‹

I have an issue with my app where I poll data using a JavaScript query every 10 seconds on an overview page.

The problem occurs when I navigate to another page while the JavaScript query is still waiting for the 10-second interval to complete. This triggers an error stating that the query is out of scope.

out of scope error

Here's what I've tried so far:

  1. Resetting and clearing the JavaScript query before navigating to another page.
  2. Disabling error notifications for the JavaScript query.

Unfortunately, this didn't work. Any advice on how to properly handle this scenario or prevent the error would be greatly appreciated!

1 Like

Hello @Simon_Damiaens!

I am surprised that steps 1 and 2 didn't work :thinking:

Could you share what you did for those steps?

Retool has both an option to ''hide query status' from users as well as a tab in the advanced settings to disable a query when a boolean value equates to true.

Check out this form post that outlines both of those here!

If they are not working then we might have a bug, which I can hopefully reproduce and send to our engineering team to fix :sweat_smile: