# Global variables

**URL:** <https://discourse.nodered.org/t/global-variables/11833>\
**Category:** General\
**Created:** [4 June 2019 10:04 UTC](https://discourse.nodered.org/t/global-variables/11833 "2019-06-04T10:04:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashash2](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@ashash2](https://discourse.nodered.org/u/ashash2)\
**Post date:** [4 June 2019 10:04 UTC](https://discourse.nodered.org/t/global-variables/11833/1 "2019-06-04T10:04:24Z")

</div>

Hi all,  
I have integrated NodeRed with an iot system that constantly sends me the temperatures of a system.  
I would like that nodered alert me by corro if the temperature passes a certain level.  
So that it does not send false positives, the system should check that 3 consecutive readings are given below the threshold, for example.  
How can I implement this in NodeRed? Can you declare variables that are kept between several executions of a flow in which to store the times the threshold has been passed?

---

<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:** [4 June 2019 10:06 UTC](https://discourse.nodered.org/t/global-variables/11833/2 "2019-06-04T10:06:03Z")

</div>

yes - see context docs - [https://nodered.org/docs/user-guide/context](https://nodered.org/docs/user-guide/context)
