# How to detect change in a flow or global variable

**URL:** <https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454>\
**Category:** Developing Nodes\
**Created:** [3 December 2018 21:43 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454 "2018-12-03T21:43:30Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [28 May 2020 21:30 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/21 "2020-05-28T21:30:34Z")

</div>

> [@cymplecy](#):
>
> pretty much against the whole Node-RED philosophy

When I started this thread, I did not consider the down side of allowing changes in a flow or global variable to propagate and cause activity in a lot of nodes. This can be a good way to lose track of the logic of a flow. I have since found that it can be important to have strict control of which nodes can modify those variables and which ones use them. MQTT or `link` nodes really help to clarify these relationships.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 May 2020 22:16 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/22 "2020-05-28T22:16:45Z")

</div>

Yes - we have always held that one of the basic tenets is that you can see what is going on. What is connected to what, No spooky magic behind the curtain. So you can visualise the flow and trace events through if necessary.

---

<div class="post-metadata">

**Author:** ![Botched1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/botched1/32/21190_2.png) [@Botched1](https://discourse.nodered.org/u/Botched1)\
**Post date:** [29 May 2020 22:07 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/23 "2020-05-29T22:07:35Z")

</div>

> [@dceejay](#):
>
> Yes - we have always held that one of the basic tenets is that you can see what is going on. What is connected to what

And those of us with literally HUNDREDS of flows over a half dozen node-red installs GREATLY appreciate that. If there started to be a lot of background "magic", it would be the death of me.

What I do wishj for is a better way to view/catagorize/select tabs/flows. But that is OT for this thread. 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 May 2020 22:22 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/24 "2020-05-29T22:22:56Z")

</div>

Suggestions welcome (though also see outliner in next version (1.1))

---

<div class="post-metadata">

**Author:** ![Botched1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/botched1/32/21190_2.png) [@Botched1](https://discourse.nodered.org/u/Botched1)\
**Post date:** [29 May 2020 22:51 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/25 "2020-05-29T22:51:47Z")

</div>

Man I'm behind the times! Outliner should work really well for me. 👍

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 May 2020 22:57 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/26 "2020-05-29T22:57:49Z")

</div>

No, you're just IN time for it.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 September 2021 08:04 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454/28 "2021-09-26T08:04:27Z")

</div>



[Previous page](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454.md?page=1)
