Defer query execution on dashboard launch
Is it possible to defer the execution of a SQL query against the db when a dashboard is launched until some dashboard JS code executes or a promise resolves?
Use case: I created dashboards that will call the reportAPI.drill() function on a drill-down report (report1) automatically on launch if the top-level column only has one value in the db. However, I do not want a report (report2) filtered by the drill hierarchy of report1 via the dashboard link interactions until after the report'1s data is evaluated and it is determined whether to call the drill API function on it.
This setup will send 2 queries to the db for report2 (one for initial load, then one once report1's data is evaluated and the drill function is called), when I only need report2's query to fire after report1 is loaded and the data is evaluated.