# Disable flow from anoter flow?

**URL:** <https://discourse.nodered.org/t/disable-flow-from-anoter-flow/73163>\
**Category:** General\
**Created:** [4 January 2023 15:02 UTC](https://discourse.nodered.org/t/disable-flow-from-anoter-flow/73163 "2023-01-04T15:02:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 January 2023 15:23 UTC](https://discourse.nodered.org/t/disable-flow-from-anoter-flow/73163/2 "2023-01-04T15:23:23Z")

</div>

Save the boolean switch to a global context variable. Then in all flows you wish to disable/able you can add a switch node and set the property to the global variable, then in the rule you can add the value you wish to allow the msg to pass.  
e.g.

```auto
[{"id":"907cc07528150308","type":"inject","z":"30306197ead446be","name":"input boolen true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":140,"y":640,"wires":[["0d7c543b3b8f4e67"]]},{"id":"0d7c543b3b8f4e67","type":"change","z":"30306197ead446be","name":"","rules":[{"t":"set","p":"boolean_pass","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":660,"wires":[[]]},{"id":"e5b30c75d3526748","type":"inject","z":"30306197ead446be","name":"input boolen false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":680,"wires":[["0d7c543b3b8f4e67"]]},{"id":"ca358979c0a6c31f","type":"inject","z":"30306197ead446be","name":"flow","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":880,"wires":[["7263449e6eb9a0be"]]},{"id":"7263449e6eb9a0be","type":"switch","z":"30306197ead446be","name":"","property":"boolean_pass","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":270,"y":880,"wires":[["24ca65c4d8110e07"]]},{"id":"24ca65c4d8110e07","type":"debug","z":"30306197ead446be","name":"debug 226","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":880,"wires":[]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/disable-flow-from-anoter-flow/73163)._
