# Possibility to update global variables

**URL:** <https://discuss.elastic.co/t/possibility-to-update-global-variables/284359>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [September 16, 2021, 5:57am UTC](https://discuss.elastic.co/t/possibility-to-update-global-variables/284359 "2021-09-16T05:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CalvinHobbes](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@CalvinHobbes](https://discuss.elastic.co/u/CalvinHobbes)\
**Post date:** [September 16, 2021, 5:57am UTC](https://discuss.elastic.co/t/possibility-to-update-global-variables/284359/1 "2021-09-16T05:57:55Z")

</div>

Is there a possibility to update global variables in Canvas so that these can be referenced (and updated) between elements?

---

<div class="post-metadata">

**Author:** ![poff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poff/32/81795_2.png) [@poff](https://discuss.elastic.co/u/poff)\
**Post date:** [October 1, 2021, 2:57pm UTC](https://discuss.elastic.co/t/possibility-to-update-global-variables/284359/2 "2021-10-01T14:57:57Z")

</div>

Hey Bjorn,

At the moment, this isn't really possible. Part of the reason is that there's no guaranteed order of evaluation for each element at the moment. If some elements were changing variables and were being executed at different times, you could get different results each time you loaded up your workpad.

You can however use var\_set to override the variable within the element's scope.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 29, 2021, 2:58pm UTC](https://discuss.elastic.co/t/possibility-to-update-global-variables/284359/3 "2021-10-29T14:58:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
