# OR Node or similiar solution

**URL:** <https://discourse.nodered.org/t/or-node-or-similiar-solution/63876>\
**Category:** General\
**Tags:** function-node\
**Created:** [13 June 2022 20:38 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876 "2022-06-13T20:38:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![duffy6](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/duffy6/32/18594_2.png) [@duffy6](https://discourse.nodered.org/u/duffy6)\
**Post date:** [13 June 2022 20:38 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876/1 "2022-06-13T20:38:21Z")

</div>

Hi guys!

I have bollean inputs and want to have an output which is TRUE if ONE of the three inputs is true.

What‘s the easiest way to do that?

Wishes  
Andreas

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 June 2022 20:42 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876/2 "2022-06-13T20:42:44Z")

</div>

This is an easy one - but I suspect that the question isn't quite right 🙂

Just use a switch node and check if payload is true

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

It will pass the message on if any message that arrives is true

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [13 June 2022 20:45 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876/3 "2022-06-13T20:45:32Z")

</div>

...but what if 2 of the inputs are true?

---

<div class="post-metadata">

**Author:** ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)\
**Post date:** [14 June 2022 06:47 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876/4 "2022-06-14T06:47:48Z")

</div>

Is this what you want?

 ![pic00](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/502e499cfc25abc94619ee8f2321fe4247e6456f.jpeg)

```auto
[{"id":"8de4dac57ab390a5","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic2","payload":"true","payloadType":"bool","x":140,"y":1740,"wires":[["b4c57c93001b84df"]]},{"id":"b4c57c93001b84df","type":"junction","z":"a0d0f696507d618e","x":280,"y":1760,"wires":[["a39f0bd25c5def86","43efefe2ee156e2e"]]},{"id":"14b1c9cf8a5a3f33","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic2","payload":"false","payloadType":"bool","x":150,"y":1800,"wires":[["b4c57c93001b84df"]]},{"id":"a39f0bd25c5def86","type":"and","z":"a0d0f696507d618e","name":"","topic":"","property":"payload","minData":"3","x":450,"y":1660,"wires":[["f12ba76774ecb30a"]]},{"id":"43efefe2ee156e2e","type":"or","z":"a0d0f696507d618e","name":"","topic":"","property":"payload","minData":"1","x":450,"y":1760,"wires":[["93d310374af76254"]]},{"id":"3eb28492ef83a2a9","type":"junction","z":"a0d0f696507d618e","x":280,"y":1640,"wires":[["43efefe2ee156e2e","a39f0bd25c5def86"]]},{"id":"2cc3bf5f14175362","type":"junction","z":"a0d0f696507d618e","x":280,"y":1880,"wires":[["a39f0bd25c5def86","43efefe2ee156e2e"]]},{"id":"f12ba76774ecb30a","type":"debug","z":"a0d0f696507d618e","name":"debug 27","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":1660,"wires":[]},{"id":"93d310374af76254","type":"debug","z":"a0d0f696507d618e","name":"debug 26","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":1760,"wires":[]},{"id":"2274c8c775d6dd84","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic1","payload":"true","payloadType":"bool","x":140,"y":1620,"wires":[["3eb28492ef83a2a9"]]},{"id":"3b70577ea11ce441","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic1","payload":"false","payloadType":"bool","x":150,"y":1680,"wires":[["3eb28492ef83a2a9"]]},{"id":"29b24e6cc693cfab","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic3","payload":"true","payloadType":"bool","x":140,"y":1860,"wires":[["2cc3bf5f14175362"]]},{"id":"9039559762e56e4c","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic3","payload":"false","payloadType":"bool","x":150,"y":1920,"wires":[["2cc3bf5f14175362"]]},{"id":"aa0b522928e906bd","type":"comment","z":"a0d0f696507d618e","name":"@mschaeffler/node-red-logic","info":"","x":500,"y":1840,"wires":[]}]

```

---

<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:** [13 August 2022 06:48 UTC](https://discourse.nodered.org/t/or-node-or-similiar-solution/63876/5 "2022-08-13T06:48:14Z")

</div>

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