# Block unless value changes

**URL:** <https://discourse.nodered.org/t/block-unless-value-changes/96617>\
**Category:** General\
**Created:** [17 April 2025 09:25 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617 "2025-04-17T09:25:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ohlala68](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ohlala68](https://discourse.nodered.org/u/Ohlala68)\
**Post date:** [17 April 2025 09:25 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/1 "2025-04-17T09:25:49Z")

</div>

Hello.  
I have a problem with the Filter-node, and more specific: When I use "Block unless value changes"  
It works like a charm and I get a SMS everytime the value changes, Great!, ...until I work with another completely different flow.  
Everytime I press "Deploy" I'll get a bunch of SMS from all the nodes that uses the filter-node with the "Block unless value changes", even if the value is the same.  
What can I do to avoid this?

---

<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:** [17 April 2025 09:29 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/2 "2025-04-17T09:29:08Z")

</div>

> [@Ohlala68](#):
>
> Everytime I press "Deploy" I'll get a bunch of SMS from all the nodes that uses the filter-node with the "Block unless value changes", even if the value is the same.

I assume you are using "full" deploy mode. This tares down and recreates all nodes (including the in-memory filter of the RBE/filter nodes)

Use "nodes" deploy mode instead.

The better solution is to use a database or other persistent storage to check if the message was sent instead of depending on in-memory state.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [17 April 2025 09:29 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/3 "2025-04-17T09:29:11Z")

</div>

Try setting the deploy to only modified nodes, then the filter will only reset if you modify the filter node.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 April 2025 09:40 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/4 "2025-04-17T09:40:44Z")

</div>

Also you might want to set the Filter node mode like this, so that it never passes the first message through.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/8832a8c499a7983b709cb9a6a28c0c53965790e8.png)

---

<div class="post-metadata">

**Author:** ![Ohlala68](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ohlala68](https://discourse.nodered.org/u/Ohlala68)\
**Post date:** [17 April 2025 09:40 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/5 "2025-04-17T09:40:59Z")

</div>

Thanks both of you!  
I have used Node-red for quite some time, but never reflected  
over the different settings for deploy! 🙂

---

<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:** [1 May 2025 09:41 UTC](https://discourse.nodered.org/t/block-unless-value-changes/96617/6 "2025-05-01T09:41:28Z")

</div>

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