Recall Dash Callbacks on a Page

In the Dash app, the user selects the database he wishes to connect to on say Home page and then via a dcclink ,the chart page is loaded and shud call the callbacks to draw the charts
Is there a way to force the dash server to recall the callbacks on a page?

In short i want trigger the callbacks on the chart page when i click the “chart” dcclink from the HOME page

Hey @biz welcome to the community.

I’m not sure I understood correctly. You want the callbacks to be triggered when the page is visited?

Hi there . Let me try to explain better. I am trying to create a dashboard showing charts and reports where data is pulled from MSSQL db

When my app.py runs ,in that file ,it connects to a database on MSSQL server
At this stage everything works fine.
Now from home page i give user option to connect to another database on same /remote MSSQL server.
After user changes the database from the home page and then clicks the chart link, the chart page doesnt execute the callbacks(and hence uses the state DB references) again since all callbacks are loaded when the app is first loaded

So as a workaround now i have created a button on the chart page which then triggers the callbacks

HomePage
HomePage

Chart Page

You could include a dcc.Location() in your layout and trigger the callback if the charts- page is navigated to.

I used the id for the link eg id=‘report-link’ as Input in callback and it triggered the callback for me.