# Switch node missing boolean?

**URL:** <https://discourse.nodered.org/t/switch-node-missing-boolean/90007>\
**Category:** General\
**Created:** [5 August 2024 16:21 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007 "2024-08-05T16:21:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [5 August 2024 16:21 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007/1 "2024-08-05T16:21:00Z")

</div>

Is there a reason that the switch node does not have a boolean option? Should I be using something else in its place to test a boolean value? (Currently I have resorted to text using 'true' and 'false'

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 August 2024 16:24 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007/2 "2024-08-05T16:24:47Z")

</div>

> [@jmorris644](#):
>
> s there a reason that the switch node does not have a boolean option

You have `is true` and `is false` (these are boolean checks)

you can also use the J expression

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/259d0c678a671a3a291ae5d05a5f887de1573ff1.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [5 August 2024 16:26 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007/3 "2024-08-05T16:26:04Z")

</div>

it has an `is true/false` option ?  
'false' as a string will evaluate as true if you test it as boolean

---

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [5 August 2024 16:36 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007/4 "2024-08-05T16:36:27Z")

</div>

Ah, haha. I was looking the wrong place!!! Thanks!!!

---

<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:** [19 August 2024 16:36 UTC](https://discourse.nodered.org/t/switch-node-missing-boolean/90007/5 "2024-08-19T16:36:57Z")

</div>

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