# Address multiple Outputs in a function node by name

**URL:** https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927
**Category:** General
**Tags:** function-node
**Created:** [9 December 2022 15:27 UTC](https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927 "2022-12-09T15:27:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TheArcher](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@TheArcher](https://discourse.nodered.org/u/TheArcher)
#### Post date: [9 December 2022 15:27 UTC](https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927/1 "2022-12-09T15:27:36Z")

</div>

Hello,

I am currently using function nodes with multiple outputs. I know how to address them in the return statement, but I would like to address outputs defined directly with node.send() either via their index or, if assigned, via their name. Is there a way to do this?

Steffen

---

<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: [9 December 2022 15:31 UTC](https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927/2 "2022-12-09T15:31:15Z")

</div>

Not explicitly, but you can do something like:

```auto

function sendToOutput(index, msg) {
   // Update '10' for how many outputs you have
   const result = new Array(10)
   result[index] = msg
   node.send(result)
}

sendToOutput(3, msg)

```

---

<div class="post-metadata">

### Author: ![TheArcher](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@TheArcher](https://discourse.nodered.org/u/TheArcher)
#### Post date: [9 December 2022 16:38 UTC](https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927/3 "2022-12-09T16:38:11Z")

</div>

Ok, build an array and adress the elements inside this array, yep, that seems possible. Not exactly what I want but always a good start.

Wouldn’t be node.output(‚out1‘).send() or node.output[5].send() an issue for featured functions?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 December 2022 16:38 UTC](https://discourse.nodered.org/t/address-multiple-outputs-in-a-function-node-by-name/71927/4 "2022-12-23T16:38:13Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
