# Callback to set attribute and another callback to use the attribute

**URL:** <https://community.plotly.com/t/callback-to-set-attribute-and-another-callback-to-use-the-attribute/16200>\
**Category:** Dash Python\
**Created:** [November 29, 2018, 8:45am UTC](https://community.plotly.com/t/callback-to-set-attribute-and-another-callback-to-use-the-attribute/16200 "2018-11-29T08:45:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![probeadd](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/probeadd/32/4876_2.png) [@probeadd](https://community.plotly.com/u/probeadd)\
**Post date:** [November 29, 2018, 8:45am UTC](https://community.plotly.com/t/callback-to-set-attribute-and-another-callback-to-use-the-attribute/16200/1 "2018-11-29T08:45:34Z")

</div>

Hi.

I’ve read that callback cannot return more than one Output.  
Also, I found that callback will fire randomly.  
Is there any suggestion for case like this:

First, I have a callback to set class state. Actually, I fetch a large data from BigQuery.  
Then I want to use the data in many Components at once (5 component).

Is there any method to let the callback fetch the data and set the state first, then the other callback can use the data. Or is there any alternative to this? Thanks.

Note: Due to a large data, I can’t create more than one callback that fetch the data and Output it to single component.

---

<div class="post-metadata">

**Author:** ![probeadd](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/probeadd/32/4876_2.png) [@probeadd](https://community.plotly.com/u/probeadd)\
**Post date:** [November 29, 2018, 8:58am UTC](https://community.plotly.com/t/callback-to-set-attribute-and-another-callback-to-use-the-attribute/16200/2 "2018-11-29T08:58:55Z")

</div>

I think I got the answer here: [https://dash.plot.ly/sharing-data-between-callbacks](https://dash.plot.ly/sharing-data-between-callbacks)

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [November 29, 2018, 11:24am UTC](https://community.plotly.com/t/callback-to-set-attribute-and-another-callback-to-use-the-attribute/16200/3 "2018-11-29T11:24:22Z")

</div>

Great! If you need more help on the Dash side, please use the “Dash” forum category. Thanks!  
-Jon
