Feature request for deleting context and flow data

Some nodes set context data and some flow data gets set as well. Sometimes I find I need to delete all data and now you have to select each piece and delete. Wouldn't it be nice to delete everything in one go.
Thanks

I randomly thought of doing a delete flow.* using a change node ...

[{"id":"7fcdfc8508254496","type":"inject","z":"7ed5b8133e5c6c5c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":3314,"y":303,"wires":[["b46e22078933b31e"]]},{"id":"b46e22078933b31e","type":"change","z":"7ed5b8133e5c6c5c","name":"","rules":[{"t":"delete","p":"*","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":3305,"y":368,"wires":[[]]}]

but it doesn't work.

This has been requested a few times and I agree it is a worthwhile feature.

In the meantime, you can DIY it with a simple function: How to clear context? - #2 by Steve-Mcl

2 Likes

I do have a work around I use but last night while deleting a bunch of data because I was too lazy to use my work around since it was almost as much work as simply doing them one at a time, I said to myself, self, maybe you should bring this up in the forum. And after a discussion with myself I lost the argument and posted. Now I would also like to be to set flow data and context data easily but I thought bringing that up too would make me look like a complainer and I remember someone else mentioning that too. So I won't mention that.

I guess you could have posted that so that we had known and talked about possible workarounds but there I go nitpicking :wink:

Personally I'm going to use @Steve-Mcl 's solution if I ever need to remove all flow values.

My work around is a much less elegant solution than @Steve-Mcl so better to stay silent and be thought a fool than post a solution and remove all doubt

I was once told: a fool jumps in where angels fear to tread.

Yet more good advice that I ignored ...

1 Like