# SWITCH NODE question

**URL:** <https://discourse.nodered.org/t/switch-node-question/2999>\
**Category:** General\
**Created:** [10 September 2018 06:51 UTC](https://discourse.nodered.org/t/switch-node-question/2999 "2018-09-10T06:51:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [10 September 2018 06:51 UTC](https://discourse.nodered.org/t/switch-node-question/2999/1 "2018-09-10T06:51:13Z")

</div>

Ok, the switch node can be used to filter messages and route them accordingly.

However I think I have found a bit of a problem.

In the node you get some options....  
msg.  
flow.  
global.  
string  
number  
J: (thingy)  
"previous value".

What about if you are sending it a payload with a TRUE/FALSE (boolean) logic?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [10 September 2018 07:08 UTC](https://discourse.nodered.org/t/switch-node-question/2999/2 "2018-09-10T07:08:30Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/59dda6c4891a39b127dd008d93393513fc236049.png)  
You mean this?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [10 September 2018 07:14 UTC](https://discourse.nodered.org/t/switch-node-question/2999/3 "2018-09-10T07:14:38Z")

</div>

Oops.

I wasn't looking there, but there ya go.
