# Trigger inject node from function node

**URL:** <https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592>\
**Category:** General\
**Created:** [6 November 2019 13:31 UTC](https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592 "2019-11-06T13:31:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakshanjsr](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sakshanjsr](https://discourse.nodered.org/u/sakshanjsr)\
**Post date:** [6 November 2019 13:31 UTC](https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592/1 "2019-11-06T13:31:07Z")

</div>

Please let me know if we can trigger an inject node from a function node.  
I tried , but not getting it.  
Helpful if anyone knows how we can do it.

---

<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:** [6 November 2019 13:36 UTC](https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592/2 "2019-11-06T13:36:24Z")

</div>

Hi @sakshanjsr

why do you want to trigger an Inject node from a Function node?

Your Function node can create a message that is identical to anything the Inject node produces and pass it to whatever you have the Inject node wired to.

---

<div class="post-metadata">

**Author:** ![sakshanjsr](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@sakshanjsr](https://discourse.nodered.org/u/sakshanjsr)\
**Post date:** [6 November 2019 13:42 UTC](https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592/3 "2019-11-06T13:42:19Z")

</div>

My function node #1 is globally setting an array , which i am calling in an inject node .  
If the array size in function node #1 is suppose 20 , my next function node #2 gets executed 20 time if i am not manually injection the array to function node #2.

---

<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:** [6 November 2019 13:51 UTC](https://discourse.nodered.org/t/trigger-inject-node-from-function-node/17592/4 "2019-11-06T13:51:49Z")

</div>

I'm not sure I fully understand what you mean. Regardless, as I said in my original reply, you can trigger a node by passing it a message - so trigger whatever you have the Inject node connected to, not the Inject node itself.
