# Node injector and msg vars

**URL:** <https://discourse.nodered.org/t/node-injector-and-msg-vars/20043>\
**Category:** General\
**Created:** [8 January 2020 10:29 UTC](https://discourse.nodered.org/t/node-injector-and-msg-vars/20043 "2020-01-08T10:29:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvanklink](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pvanklink](https://discourse.nodered.org/u/pvanklink)\
**Post date:** [8 January 2020 10:29 UTC](https://discourse.nodered.org/t/node-injector-and-msg-vars/20043/1 "2020-01-08T10:29:00Z")

</div>

Does a injector node can set message.vars like:  
msg.config = 'xxx';  
msg.oscmd = 'yyy'

Or do i have to add a separate CHANGE node or function for this ...

---

<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:** [8 January 2020 10:33 UTC](https://discourse.nodered.org/t/node-injector-and-msg-vars/20043/2 "2020-01-08T10:33:23Z")

</div>

The Inject node can only set the payload and/or topic. For anything else, use a Change node after the Inject node.

---

<div class="post-metadata">

**Author:** ![pvanklink](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pvanklink](https://discourse.nodered.org/u/pvanklink)\
**Post date:** [8 January 2020 12:59 UTC](https://discourse.nodered.org/t/node-injector-and-msg-vars/20043/3 "2020-01-08T12:59:44Z")

</div>

Ok, i have my (management) dashboard almost done.. It is working!  
I can select one off 5 raspberry pi (servers)  
select a OS command and check if the server is up , and if not, exec a selected OS command

OR select a server and turn on a device

Only ugly thing is that when selecting an OS command the device option must be hide.  
Is that possible to hide a dashboard item with a function?

 ![Naamloos](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bc8f93b507e7e2943f245370cb490d4307b8e59f.png)
