# SWITCH node question?

**URL:** <https://discourse.nodered.org/t/switch-node-question/94682>\
**Category:** General\
**Created:** [16 January 2025 16:09 UTC](https://discourse.nodered.org/t/switch-node-question/94682 "2025-01-16T16:09:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee\_evo](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@lee\_evo](https://discourse.nodered.org/u/lee_evo)\
**Post date:** [16 January 2025 16:09 UTC](https://discourse.nodered.org/t/switch-node-question/94682/1 "2025-01-16T16:09:01Z")

</div>

Hi, I have a SWITCH node that's accepting a payload (boolean or numeric) and testing it against 2 rules

pin1 output: boolean value

pin2 output : number \<= 100

When the payload is a number \<= 100 everything is fine and the switch node only outputs on the pin2

When the payload is a boolean value, the node correctly outputs the true/false value on pin1 but also outputs the same true/false value on pin2.

seems strange behaviour and I cant see the logic behind it, I'm hoping someone can explain it

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [16 January 2025 16:22 UTC](https://discourse.nodered.org/t/switch-node-question/94682/2 "2025-01-16T16:22:40Z")

</div>

Can you show the node config ?

I agree that the logic doesn't seem right, but can stop this by setting stop after first match

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77019eeadf71a8a0f40f03ceffea1d6fac37723c.png)

Basically true evaluates to 1 and false to 0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 January 2025 16:22 UTC](https://discourse.nodered.org/t/switch-node-question/94682/3 "2025-01-30T16:22:58Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
