# Feature request, edit Inject value without deploy

**URL:** <https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729>\
**Category:** General\
**Created:** [7 February 2019 21:51 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729 "2019-02-07T21:51:37Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![moebius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/moebius/32/2872_2.png) [@moebius](https://discourse.nodered.org/u/moebius)\
**Post date:** [13 February 2019 18:30 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/21 "2019-02-13T18:30:20Z")

</div>

Here is my proposal:

- On the current inject node, only a checkbox "Enable advanced features".
- All nodes with this chechkbox enabled are shown in the sidebar (like the config nodes).
- In the sidebar it is possible to inject or edit the injection message without deployment.
- Additionally it would be nice to have a list of the last x msgs to choose from.  
and an option on the debug messages "Add msg to injection msgs list", to easily reuse a debug msg with an injection node.

---

<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:** [20 May 2021 14:56 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/22 "2021-05-20T14:56:48Z")

</div>

Hi Nick,

I know this is still on the trello board but there doesnt seem like much in the way of a formal spec like the `mqtt-control` had.

So I had a bit of play this afternoon...

With a little bit refactoring of the inject node and calling the built in `RED.tray.show()` I achieved this...

 ![MaGSdM0uV7](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/42fbe558cbe0f0b0404232b61fdd80d449a6cbf7.gif)

NOTES

- values in the inject config are never changed (so no deploy)
- I did at first use a popup dialog (and it looked good but editing the buffer/json was problematic)

  

Any good for node-red v2.0.0?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 May 2021 15:05 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/23 "2021-05-20T15:05:31Z")

</div>

> [@Steve-Mcl](#):
>
> Any good for node-red v2.0.0?

No - we don't want a pop-up to appear every time the user clicks the inject button - that will annoy most users.

Please talk to us _before_ you spend time implementing features on the backlog. Especially where there is no existing discussion on the design of the feature. Given how long some of the items on the trello board have sat there, do not assume we still want to do them as written. Talk to us first.

I don't have a good answer for what the UX should be though - which is why this item has sat on the backlog for so long.

---

<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:** [20 May 2021 15:10 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/24 "2021-05-20T15:10:41Z")

</div>

> [@knolleary](#):
>
> No - we don't want a pop-up to appear every time the user clicks the inject button - that will annoy most users.

The tray is only presented if the user holds a modifier key. Otherwise the inject just occurs as before. Seemed like the obvious solution. (modifier key to modify values) and I only used existing components (tray) so nothing new.

It's not an issue if you don't want it. It was just a bit of play time.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 May 2021 15:16 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/25 "2021-05-20T15:16:43Z")

</div>

> [@Steve-Mcl](#):
>
> The tray is only presented if the user holds a modifier key.

Okay - I didn't see that mentioned in your description. That seems reasonable.

I see you say it doesn't require a deploy, but does it update the node properties locally with the updated values? I can see a case for both doing and _not_ doing that. I wonder if having a checkbox at the bottom of the dialog that says 'update node properties' could give the user that choice.

I could imagine if they want to quickly iterate to find the right value to inject by testing different values, they want to make sure the value is stored in the node when they get it right.

> [@Steve-Mcl](#):
>
> It's not an issue if you don't want it. It was just a bit of play time.

No worries - just please check in with us here or on slack before you invest your time on things that may not be a good fit at the moment.

Given where you've got to, you may as well put in a PR against `dev` and we continue the discussion of the details there.

---

<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:** [20 May 2021 15:22 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/26 "2021-05-20T15:22:55Z")

</div>

> [@knolleary](#):
>
> I didn't see that mentioned in your description. That seems reasonable.

Yeah, hard to convey in a gif (so I put it in the comment) - I probably should have put it in the NOTES tbf.

I did also think about whether changes should be applied back to the node but in the end, as it was just a POC, I didn't (and it can be added later if requested)

I will push a PR later after a bit more play. Make sure there are no silly mistakes or issues.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 May 2021 16:09 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/27 "2021-05-20T16:09:48Z")

</div>

I would agree that an option to push the changed values back to the node would be really useful. Especially if the option were sticky so you can set it once for a node and it is remembered.

Would that trigger a need for a redeploy though? Be nice if it didn't.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 May 2021 16:13 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/28 "2021-05-20T16:13:27Z")

</div>

> [@TotallyInformation](#):
>
> Would that trigger a need for a redeploy though? Be nice if it didn't.

You cannot update the flow configuration in the runtime without a deploy.

---

<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:** [20 May 2021 19:35 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/29 "2021-05-20T19:35:43Z")

</div>

> [@knolleary](#):
>
> I see you say it doesn't require a deploy, but does it update the node properties locally with the updated values? I can see a case for both doing and _not_ doing that. I wonder if having a checkbox at the bottom of the dialog that says 'update node properties' could give the user that choice

> [@TotallyInformation](#):
>
> I would agree that an option to push the changed values back to the node would be really useful.

Based your on your comments, you gave me an idea...

- Keep the tray open so user can Inject over and over until they are happy with the result
- User can press Apply button to keep changes  
or
- User can click Cancel if they want to discard the changes

I think that feels a bit more useful - any thoughts?  
 ![gqdNQMXqZ9](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b97efacc7c0a5daa9d417f7fdf484d5a4859b3ee.gif)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 May 2021 19:37 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/30 "2021-05-20T19:37:32Z")

</div>

~~So does 'Apply' also do the Inject? Is it actually 'Apply & Inject'?~~

_edit_ - reread what you said... ok, I see what you mean. Lets have a PR so we can try it out and see.  
...

I would still prefer we moved over to the context of a PR for the ongoing discussion.

---

<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:** [20 May 2021 19:39 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/31 "2021-05-20T19:39:13Z")

</div>

> [@knolleary](#):
>
> So does 'Apply' also do the Inject? Is it actually 'Apply & Inject'?

No, inject only injects. Apply only applies. (Atomic actions)

> [@knolleary](#):
>
> I would still prefer we moved over to the context of a PR for the ongoing discussion.

Yes, my bad, that's the next thing I'll do.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 May 2021 19:41 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/32 "2021-05-20T19:41:19Z")

</div>

I will say that have the primary button of the dialog _not_ close it would be inconsistent with all other dialogs, so whilst there's merit in having the dialog open between multiple injects, the inject button shouldn't be in the top like that.

---

<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:** [20 May 2021 19:42 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/33 "2021-05-20T19:42:46Z")

</div>

I'll raise that in the PR as a discussion point Nick.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 May 2021 05:34 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/34 "2021-05-21T05:34:44Z")

</div>

For those that like to keep following this discussion, @Steve-Mcl has created a [pull request](https://github.com/node-red/node-red/pull/2990) where the saga continues....

This feature will be very useful for me for experimenting while developing new nodes. But I can see lots of other use cases e.g. when using Node-RED as a mock for some system, and so on...

Really nice feature 👍

---

<div class="post-metadata">

**Author:** ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)\
**Post date:** [22 May 2021 17:40 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/35 "2021-05-22T17:40:48Z")

</div>

thank you all!

---

<div class="post-metadata">

**Author:** ![Wu-haifen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wu-haifen/32/54105_2.png) [@Wu-haifen](https://discourse.nodered.org/u/Wu-haifen)\
**Post date:** [13 January 2022 08:58 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/36 "2022-01-13T08:58:22Z")

</div>

Where can I get the code, please

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 January 2022 08:58 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/37 "2022-01-13T08:58:55Z")

</div>

@Wu-haifen this feature was release in Node-RED 2.1

---

<div class="post-metadata">

**Author:** ![Wu-haifen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wu-haifen/32/54105_2.png) [@Wu-haifen](https://discourse.nodered.org/u/Wu-haifen)\
**Post date:** [13 January 2022 09:01 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/38 "2022-01-13T09:01:44Z")

</div>

Okay, thank you!

[Previous page](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729.md?page=1)
