How to pass value from one page to another page in Dash?

I have a link in Dash table which opens another Dash page in new window. Next I want to do is pre populate the values in another page based on the Link clicked in Dash Table on 1st Page.

1st Page has Dash table with link in the 1st column cells.
2nd Page has dropdown to selected company and show data/info for that company.

What I am trying to do is if I click on company link on Page 1 Table my second page should open n pull the data/info for company selected on Page 1.

Any idea how to do that?

You can create a dynamic link on the style of: /newpage??value=[{value1},{value2}]

Afterwards you can use:

@app.callback(Output("page-content", "children"), [Input("url", "pathname")])
def get_data_from_link(path):
    # process page based on path data
    return html.Div(['whatever you need in here with the data'])

I hope it helps.

1 Like

Hi @Snow,

Did you find the solution to do this?

Can you share?