Order of flow of retool dashboard execution

I have a dashboard full of elements that get data from several queries, when I first load the dashboard it starts producing errors from most of the elements because it tries to get the data before the queries are even finished.
how can I make a specific element wait for a specific query to finish successfully before it tries to print the data?

Hey @msaleh! Would you mind sharing a screenshot of the settings (right side panel) for a component running into this issue?

Generally, components should just show themselves in a loading state while they're waiting for their underlying data to populate!

my app has two tabs as follows:
Screenshot 2023-03-17 at 5.44.24 PM
'Requests' tab is the default one and it opens by default when you boot the app..
I have separated my queries.. some of them will run when (MainContainerTabs.currentViewKey = 0) and others will run when (MainContainerTabs.currentViewKey = 1).. when I first boot the app, the tables and charts under the 'Trace Request' tab will start generating (not_found) errors because the queries the supply them with data are disabled and they haven't been executed yet..
this is the settings of one of the components:

Got it!

So you can’t really make a component wait, but I can currently think of two options.

1. In your table component, you can do something like {{ yourQuery.data || [] }} if yourQuery.data property is returning null at the time of component load. Other components have other ideal empty states, so for a text component for example, you could do something like {{ anotherQuery.data ? anotherQuery.data.names[0] : “” }} to use the first name in the query data or an empty string of the query data doesn’t exist yet.

2. Whenever you switch tabs, you can add an event handler to trigger the relevant queries!

Would either of those work for you? :slightly_smiling_face::crossed_fingers: