# Need help to use if function in Node Red

**URL:** https://discourse.nodered.org/t/need-help-to-use-if-function-in-node-red/36091
**Category:** Developing Nodes
**Created:** [17 November 2020 19:31 UTC](https://discourse.nodered.org/t/need-help-to-use-if-function-in-node-red/36091 "2020-11-17T19:31:15Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [18 November 2020 10:49 UTC](https://discourse.nodered.org/t/need-help-to-use-if-function-in-node-red/36091/2 "2020-11-18T10:49:27Z")

</div>

Welcome to the forum!

It's helpful to explain what the flow is suppose in detail. i.e. what should happen when the input is a 1 and what should happen when it is a 0?

What do you mean by `it seem it’s not stable and it will stop running at some point`?

You could use a pair of `inject` buttons for testing and I'd suggest adding in several `debug` nodes so you can see what the data is that is passed thru the flow.

If you want someone to help, make sure to answer all questions that are asked and it's also a good idea to export the flow and attach it to a reply (read [this thread](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) first)

---

_[View the full topic](https://discourse.nodered.org/t/need-help-to-use-if-function-in-node-red/36091)._
