# Switch node "in between" not functioning correctly

**URL:** <https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178>\
**Category:** General\
**Created:** [2 October 2019 00:33 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178 "2019-10-02T00:33:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwawrzyniec](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mwawrzyniec](https://discourse.nodered.org/u/mwawrzyniec)\
**Post date:** [2 October 2019 00:33 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178/1 "2019-10-02T00:33:23Z")

</div>

I have a switch node that I am having trouble getting to work. The "\>=" and "\<=" are both working properly. The "is between" is not outputting anything. Anyone have any ideas?

```auto
[{"id":"e6a03d25.0cfb48","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"b9b39678.031938","type":"ui_switch","z":"e6a03d25.0cfb48","name":"","label":"","tooltip":"","group":"c123e7bd.857","order":1,"width":"6","height":"2","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":770,"y":180,"wires":[["448511b0.86237"]]},{"id":"448511b0.86237","type":"rbe","z":"e6a03d25.0cfb48","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":910,"y":180,"wires":[["fba482ac.b93038"]]},{"id":"c71efdec.0a0ae8","type":"change","z":"e6a03d25.0cfb48","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":140,"wires":[["b9b39678.031938"]]},{"id":"b7cd7744.e382b","type":"change","z":"e6a03d25.0cfb48","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":180,"wires":[["b9b39678.031938"]]},{"id":"ea2e0ebe.c0bfa8","type":"change","z":"e6a03d25.0cfb48","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":220,"wires":[["b9b39678.031938"]]},{"id":"4d4358d6.0430c","type":"switch","z":"e6a03d25.0cfb48","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"85","vt":"num"},{"t":"btwn","v":"85","vt":"num","v2":"65","v2t":"num"},{"t":"lte","v":"65","vt":"num"}],"checkall":"false","repair":false,"outputs":3,"x":290,"y":180,"wires":[["c71efdec.0a0ae8","c32a07d3.929848"],["c32a07d3.929848","b7cd7744.e382b"],["ea2e0ebe.c0bfa8","c32a07d3.929848"]]},{"id":"8ddff963.3c0aa8","type":"inject","z":"e6a03d25.0cfb48","name":"","topic":"","payload":"75","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":180,"wires":[["4d4358d6.0430c"]]},{"id":"c32a07d3.929848","type":"debug","z":"e6a03d25.0cfb48","name":"switch","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":80,"wires":[]},{"id":"1c12c0a7.9b7647","type":"inject","z":"e6a03d25.0cfb48","name":"","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":140,"wires":[["4d4358d6.0430c"]]},{"id":"fc07edac.10fda8","type":"inject","z":"e6a03d25.0cfb48","name":"","topic":"","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":220,"wires":[["4d4358d6.0430c"]]},{"id":"fba482ac.b93038","type":"debug","z":"e6a03d25.0cfb48","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":180,"wires":[]},{"id":"c123e7bd.857","type":"ui_group","z":"","name":"Main","tab":"3c588071.0152c","disp":false,"width":"24","collapse":false},{"id":"3c588071.0152c","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [2 October 2019 00:40 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178/2 "2019-10-02T00:40:43Z")

</div>

swap the between - currently you have "between 85 and 65" change it to "between 65 and 85"

---

<div class="post-metadata">

**Author:** ![mwawrzyniec](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mwawrzyniec](https://discourse.nodered.org/u/mwawrzyniec)\
**Post date:** [2 October 2019 01:11 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178/3 "2019-10-02T01:11:49Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 October 2019 08:54 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178/4 "2019-10-02T08:54:28Z")

</div>

The switch node ought to handle that... as "in between" does imply that it should... will fix.. thanks

---

<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:** [2 October 2019 09:17 UTC](https://discourse.nodered.org/t/switch-node-in-between-not-functioning-correctly/16178/5 "2019-10-02T09:17:57Z")

</div>

Do you guys think of everything ? You guys think of everything!
