# Will asynchronous change in a context variable with flow-scope, be immediately noticed by other nodes in the flow?

**URL:** <https://discourse.nodered.org/t/will-asynchronous-change-in-a-context-variable-with-flow-scope-be-immediately-noticed-by-other-nodes-in-the-flow/34897>\
**Category:** General\
**Created:** [27 October 2020 14:47 UTC](https://discourse.nodered.org/t/will-asynchronous-change-in-a-context-variable-with-flow-scope-be-immediately-noticed-by-other-nodes-in-the-flow/34897 "2020-10-27T14:47:35Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [28 October 2020 01:57 UTC](https://discourse.nodered.org/t/will-asynchronous-change-in-a-context-variable-with-flow-scope-be-immediately-noticed-by-other-nodes-in-the-flow/34897/6 "2020-10-28T01:57:09Z")

</div>

In short, No. You must query the global/flow variable to get its current value, and then act or process that value accordingly. Check out the following for details...  
[https://nodered.org/docs/user-guide/context](https://nodered.org/docs/user-guide/context)

And this is also a interesting read...

> **[Node-RED Global Flow and Context - Scargill's Tech Blog](https://tech.scargill.net/node-red-global-flow-and-context/)**
>
> There’s a mouthful. This short article is about the various kinds of variables used in Node-Red and more importantly how to initialise them and how to view them. So in Node-Red when you want to use variables – there are three basic types as well as...

You could setup a flow to poll the value, and then take action on change of value. Others in this forum may have setup something that is a bit more elegant, but as I said, there is per my understanding no trigger on value change logic.

I believe this topic has been discussed at length in the following thread...

> [@How to detect change in a flow or global variable](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454):
>
> Is it possible for a custom node to react immediately to a change in a flow/global variable? Is there an event emitted when a function node executes something like global.set("global","value") or when a change node modifies a variable?

---

_[View the full topic](https://discourse.nodered.org/t/will-asynchronous-change-in-a-context-variable-with-flow-scope-be-immediately-noticed-by-other-nodes-in-the-flow/34897)._
