# 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:** 20\
**Page:** 1

<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:** [7 February 2019 21:51 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/1 "2019-02-07T21:51:38Z")

</div>

It would be really comfortable to edit the inject value without deploying all, it will speed up the debug process. Thank you

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [7 February 2019 22:12 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/2 "2019-02-07T22:12:11Z")

</div>

You can change deploy all to only deploy modified nodes

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/de9a4ec0176429ff285a430e86d36f82a96810e6.png)

---

<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:** [7 February 2019 22:15 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/3 "2019-02-07T22:15:16Z")

</div>

ok, but having a way to change it without deplying at all would speed up more..

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [8 February 2019 07:27 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/4 "2019-02-08T07:27:58Z")

</div>

It would speed up development but doing so goes against basic Node-RED developers philosophy that the editor is not a dashboard

I normally work around this restriction by connecting a few inject nodes together with different values such as 0, 1,10,50 100 - that sort of thing

I've even done this sort of thing

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/63a01b76e1ace2beb16f6bc469a395efb8031802.png)

On a couple of occasions, I've made a simple dashboard to have complete control

But all the workarounds have downsides

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [8 February 2019 15:52 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/5 "2019-02-08T15:52:15Z")

</div>

I might be wrong, but I think there is more to it. Until you deploy, the runtime does not know about anything you have done in the editor. Changing that would mean coupling the two closer together when work is in progress to get them fully de-coupled.

---

<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:** [8 February 2019 18:57 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/6 "2019-02-08T18:57:22Z")

</div>

> [@drmibell](#):
>
> ould mean coupling the two closer together when work is in progress to get them fully de-coupled.

Yes sure, it's not an easy feature to implement this. But maybe it will be possible in the future to make Node Red "listen" for browser changes and implement them on the fly. Sounds not impossible

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [8 February 2019 19:23 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/7 "2019-02-08T19:23:22Z")

</div>

I didn't mean to say it is impossible or even difficult, just that it goes against the direction that NR is headed. The benefits of the planned decoupling of the editor and runtime almost certainly outweigh any gain from this 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:** [12 February 2019 12:54 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/8 "2019-02-12T12:54:09Z")

</div>

There is already an active comunication between Node red and web board during thr deploy, such errors reported by devices, debug, and also the inject buttons pressure. So there is actually a packet from web board to Node red flow "iject button is pressed, do your job". There will be only necessary to add value to this packet too.. I don't think this may "twist" the whole direction of NR.. which I understand what it is of course..

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [12 February 2019 23:23 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/9 "2019-02-12T23:23:53Z")

</div>

> [@GiovanniG](#):
>
> There is already an active comunication between Node red and web board during thr deploy, such errors reported by devices, debug, and also the inject buttons pressure

True, but these communications are configured when you deploy a flow and can't be changed without another deploy. For example, you can turn `debug` nodes on and off because the browser can control what it displays, but changing from `msg.property` to `complete message object` requires a redeploy. As you imply, hitting the button on the `inject` node tells the runtime that the button has been pushed, but the message this creates in the flow has been set in advance and can't be changed without a re-deploy. I think the change you want would require a pretty massive re-working of the `inject` node. As @cymplecy says, a simple dashboard can inject almost anything you want into a flow for testing purposes.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 February 2019 08:21 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/10 "2019-02-13T08:21:46Z")

</div>

I'm wondering whether the feature request should be changed to allow a dashboard to be displayed as an iframe in the editor.

---

<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 February 2019 08:43 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/11 "2019-02-13T08:43:10Z")

</div>

This feature is one that is already on the backlog and has been for some time - [https://trello.com/c/SjfBYhVl/140-quick-inject-tools](https://trello.com/c/SjfBYhVl/140-quick-inject-tools)

When you click the button on the Inject node it sends an HTTP request to the runtime to trigger the node. Currently that is an empty request that just tells the node to inject what it is configured with.

It is not a big leap to say that request could contain the information about the message to inject. So the underlying implementation is not the hard part.

The hard part is the user experience in the editor.

The most straight-forward approach would be for the button on the Inject node to always send whatever the node is configure with - regardless of whether it has been deployed or not (assuming the node _has_ been deployed at some point - if the node has never been deployed then the runtime won't know anything about it). That would be the smallest change needed - but equally could cause unexpected results. For example, if the deployed node is set to inject every 5 seconds, clicking the button would do a one-time-inject of the edited node config, but the 5-second inject would continue with the _deployed_ configuration.

Doing it as a separate piece of UI away from the node then becomes hard to manage when you have dozens of Inject nodes.

So happy to let this thread develop ideas - just know the focus should be the user experience.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 February 2019 08:54 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/12 "2019-02-13T08:54:14Z")

</div>

it would also have to block if any wiring changes had occurred in the editor.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 February 2019 11:44 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/13 "2019-02-13T11:44:08Z")

</div>

> [@knolleary](#):
>
> The most straight-forward approach would be for the button on the Inject node to always send whatever the node is configure with - regardless of whether it has been deployed or not (assuming the node _has_ been deployed at some point - if the node has never been deployed then the runtime won't know anything about it). That would be the smallest change needed - but equally could cause unexpected results. For example, if the deployed node is set to inject every 5 seconds, clicking the button would do a one-time-inject of the edited node config, but the 5-second inject would continue with the _deployed_ configuration.

I'd never dreamt that something like this would be allowed in NodeRED

For development work (which is what inject is used for - apart from people misusing editor as a dashboard ) I'd GLADLY accept the unexpected.

During my development, I'm ALWAYS experiencing the unexpected so one more is no problem at all 🙂  
_(Not due to to NodeRED - due to my incompetence using it!)_

---

<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:** [13 February 2019 13:07 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/14 "2019-02-13T13:07:15Z")

</div>

Dear friends, thank you for supporting this thread!

I would suggest, let's make the things easiest!  
We suppose that if for debuginng is necessay to change the Injected value, it will be the same nature of value that we used on deploy.. so, let's filter on the browser side the nature/type of values, it should be the same nature as deployed value, if it is not the browser will not allow it, and not send to Node Red the new value. For example:  
I deployed an Inject node with string "Hello",, now to test my function script I would send instead the string "Hello /n 123", the browser knows that the flow was deployed with that Inject node containing a string, the browser check that I inputed a new string too, allows and sends the string to Node Red. Now if we push the button we will inject the new string instead the old one.  
If in Inject I configured number but I try to send chars, the browser will return an error and don't send anything to Node Red, this will preserve Node Red. We may use the same script used now to check the values typed on Inject node before deploy.. if there is a mistake Node Red tell us it as now before deploy  
We may also keep for now this feature valid for string and numbers only.. that may be enough for the majority of debugging.  
If we need to change the type/nature of values we need to re-deploy as now..

I don't see from my small point of view big problems to change values of periodic inject nodes. but if you think so let's introduce the edit feature only for manual inject..

---

<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:** [13 February 2019 13:10 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/15 "2019-02-13T13:10:59Z")

</div>

> [@cymplecy](#):
>
> For development work (which is what inject is used for

That isn't quite correct. Don't forget that inject also is a mini-scheduler. I use inject to trigger a web request every few seconds for example. This isn't development work and it isn't a misuse of the editor.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 February 2019 13:15 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/16 "2019-02-13T13:15:31Z")

</div>

Good point 🙂

---

<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:** [13 February 2019 13:17 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/17 "2019-02-13T13:17:27Z")

</div>

> [@GiovanniG](#):
>
> I don't see from my small point of view big problems to change values of periodic inject nodes. but if you think so let's introduce the edit feature only for manual inject..

The problem for me is that the inject node is about the first node anyone has ever used and the way it works is pretty much as old as Node-RED itself. so making fundamental changes to it has the potential for massive impact.

What I've read in the thread so far makes me uncomfortable that it leaves things open for confusion and edge-cases and makes users have to really think carefully about what they've done and where they've got up to.

I think that this would be a good candidate for a NEW node. One that behaves in the way you say. That way, the behaviour is expected and only invoked by taking a conscious decision to insert it. Even better, it could take an input (which could, of course, be your standard inject), therefore being a lot more useful since you could dynamically change ANY thoughput which is much more likely to be useful in development.

So more like a "Dynamic Change" node than a dynamic input to inject.

---

<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:** [13 February 2019 13:51 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/18 "2019-02-13T13:51:57Z")

</div>

Yes of course, a new "advanced inject node" for advanced users is welcome too 🙂

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [13 February 2019 14:00 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/19 "2019-02-13T14:00:35Z")

</div>

> [@GiovanniG](#):
>
> Yes of course, a new "advanced inject node" for advanced users is welcome too

Best of both worlds - no confusion and much easier debugging for everyone 🙂

---

<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 February 2019 14:27 UTC](https://discourse.nodered.org/t/feature-request-edit-inject-value-without-deploy/7729/20 "2019-02-13T14:27:07Z")

</div>

To be honest, I disagree. Adding another node to the palette that looks and smells like the Inject node, but has slightly different functionality would potentially cause more confusion.

If we decide to do anything in this area, it would have to be an incremental change to the existing Inject node that doesn't break any existing behaviour or expectation - it would be additional functionality that is clear and obvious and can just as easily be ignored. That is why getting the UX right is the first task before committing to doing anything.

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