# Switch node with dynamic value

**URL:** <https://discourse.nodered.org/t/switch-node-with-dynamic-value/1092>\
**Category:** General\
**Created:** [26 June 2018 07:07 UTC](https://discourse.nodered.org/t/switch-node-with-dynamic-value/1092 "2018-06-26T07:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamsvag](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@kamsvag](https://discourse.nodered.org/u/kamsvag)\
**Post date:** [26 June 2018 07:07 UTC](https://discourse.nodered.org/t/switch-node-with-dynamic-value/1092/1 "2018-06-26T07:07:38Z")

</div>

I have a switch node where I switch the msg to one path if the payload is below 20 and another path for ‘otherwise’. However, I want the value of ‘20’ be configurable through the ‘dashboard’ text node.

Any ideas?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 June 2018 07:26 UTC](https://discourse.nodered.org/t/switch-node-with-dynamic-value/1092/2 "2018-06-26T07:26:35Z")

</div>

You can configure the Switch node to compare payload against a ‘flow context’ variable. You can then set that flow context value by wiring a Change node after whatever dashboard input widget you want to use.
