# Multi output duplicates

**URL:** <https://community.plotly.com/t/multi-output-duplicates/30303>\
**Category:** Dash Python\
**Created:** [October 21, 2019, 7:06pm UTC](https://community.plotly.com/t/multi-output-duplicates/30303 "2019-10-21T19:06:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin\_engel](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@martin\_engel](https://community.plotly.com/u/martin_engel)\
**Post date:** [October 21, 2019, 7:06pm UTC](https://community.plotly.com/t/multi-output-duplicates/30303/1 "2019-10-21T19:06:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alexcjohnson](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/alexcjohnson/32/614_2.png) [@alexcjohnson](https://community.plotly.com/u/alexcjohnson)\
**Post date:** [October 22, 2019, 5:38am UTC](https://community.plotly.com/t/multi-output-duplicates/30303/2 "2019-10-22T05:38:48Z")

</div>

> [@martin\_engel](#):
>
> As a workaround I generated just one callback and made a if/else statement to check which button created the Input

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?

---

<div class="post-metadata">

**Author:** ![martin\_engel](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@martin\_engel](https://community.plotly.com/u/martin_engel)\
**Post date:** [October 22, 2019, 12:33pm UTC](https://community.plotly.com/t/multi-output-duplicates/30303/3 "2019-10-22T12:33:57Z")

</div>

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