# How to reset the Filter (old RBE) node?

**URL:** <https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431>\
**Category:** General\
**Created:** [6 August 2021 17:29 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431 "2021-08-06T17:29:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![finch6](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@finch6](https://discourse.nodered.org/u/finch6)\
**Post date:** [6 August 2021 17:29 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/1 "2021-08-06T17:29:46Z")

</div>

Hi everyone...

Not sure if this is a bug or my stupidity 🤷🏼‍♂️  
Probably the latter...

In the Node info in Node-red, it says you can pass a `msg.reset` to reset the filter node. I tried it, but I can't get it to work...

The online documentation doesn't mention the reset function at all - [node-red-node-rbe](https://flows.nodered.org/node/node-red-node-rbe)

I even saw this thread - [How to reset rbe?](https://discourse.nodered.org/t/how-to-reset-rbe/31876) - but even following this doesn't work... I do realise this may be old...

So the question is... Did the reset function get removed when it changed from RBE to Filter?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [6 August 2021 17:45 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/2 "2021-08-06T17:45:09Z")

</div>

No the reset option is still present.

You need to set `msg.reset` to any value except `false` and `0`.

If there is a `msg.topic` value set then it will only clear the filter for messages sent with that topic. If there is no `msg.topic` attached to the message used to reset then it should clear all the current filter values.

---

<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:** [6 August 2021 17:49 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/3 "2021-08-06T17:49:13Z")

</div>

Here is an example that resets the rbe, you can reset by topic or if no topic specified, reset all topics. I often forget the rbe/filter node filters the payloads by topic to.

```auto
[{"id":"b2eb4dca.ed2c1","type":"inject","z":"c74669a0.6a34f8","name":"topic 1 value 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"1","payloadType":"num","x":200,"y":2400,"wires":[["460e158e.569cec"]]},{"id":"460e158e.569cec","type":"rbe","z":"c74669a0.6a34f8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":410,"y":2400,"wires":[["9feea51b.32922"]]},{"id":"9feea51b.32922","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":580,"y":2400,"wires":[]},{"id":"e59d5bf.098c2a8","type":"inject","z":"c74669a0.6a34f8","name":"topic 2 value 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"2","payload":"1","payloadType":"num","x":190,"y":2440,"wires":[["460e158e.569cec"]]},{"id":"222b099b.6f1806","type":"inject","z":"c74669a0.6a34f8","name":"reset all topics","props":[{"p":"reset","v":"any value you wish","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":2540,"wires":[["460e158e.569cec"]]},{"id":"346fe934.fa43fe","type":"inject","z":"c74669a0.6a34f8","name":"reset topic 1","props":[{"p":"reset","v":"any value you wish","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","x":140,"y":2580,"wires":[["460e158e.569cec"]]}]

```

This was written on a 1.3 node-red, but as far as i am aware the reset is still there in V2

---

<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:** [6 August 2021 18:04 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/4 "2021-08-06T18:04:47Z")

</div>

> [@finch6](#):
>
> The online documentation doesn't mention the reset function

it is in the help pane for the node in the editor  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52abd4b73aa191f1b958f8a5fbe786496c8965ea.png)

---

<div class="post-metadata">

**Author:** ![finch6](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@finch6](https://discourse.nodered.org/u/finch6)\
**Post date:** [6 August 2021 18:07 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/5 "2021-08-06T18:07:34Z")

</div>

Hi Colin, yes, I just couldn't get it working as I was just passing `msg.reset` without the 0 or false

> In the Node info in Node-red, it says you can pass a `msg.reset` to reset the filter node. I tried it, but I can't get it to work...

---

<div class="post-metadata">

**Author:** ![finch6](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@finch6](https://discourse.nodered.org/u/finch6)\
**Post date:** [6 August 2021 18:09 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/6 "2021-08-06T18:09:20Z")

</div>

Thank you very much everyone for the quick replies 😁

Got it sorted now. I think my rbe nodes went a little fruity when I updated to Node 2.0 🤷🏼‍♂️  
Soon as I added a new filter node and tried it, it worked. But not with my old nodes from the previous version of Node-red...

But thank you nonetheless 😁

---

<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:** [5 October 2021 18:09 UTC](https://discourse.nodered.org/t/how-to-reset-the-filter-old-rbe-node/49431/7 "2021-10-05T18:09:51Z")

</div>

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