Multi output duplicates

Hello dash world

I am quite new to Dash but I like it. I have the (known) issue to use the same Output for (at least) two callbacks, which results in an error message.
In my code I have two buttons:
1.) Create data and show in a 3D graph
2.) Load data and show in a 3D graph

As a workaround I generated just one callback and made a if/else statement to check which button created the Input, so only this is feed into the 3D graph Output. Is there a better way? A chained callback or something?

Thank you!

Reagards
Martin

Yes, that’s the canonical way to do this. Otherwise it’s ambiguous, in principle, which callback should deliver the results. Did you find dash.callback_context.triggered, which is the newer and easier way to do this than the timestamp props?

Hi!
Thank you. I implemented the ctx.triggered successfully. It works nice!