# Send a message from a custom function node without output option

**URL:** <https://discourse.nodered.org/t/send-a-message-from-a-custom-function-node-without-output-option/82308>\
**Category:** General\
**Tags:** function-node\
**Created:** [24 October 2023 14:57 UTC](https://discourse.nodered.org/t/send-a-message-from-a-custom-function-node-without-output-option/82308 "2023-10-24T14:57:29Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [26 October 2023 15:42 UTC](https://discourse.nodered.org/t/send-a-message-from-a-custom-function-node-without-output-option/82308/29 "2023-10-26T15:42:04Z")

</div>

Feedback:

Modifying `outputs` in the html file is the correct way, and of course to address the outputs in the JS file where necessary.

```js
self.send([msg,undefined]) /* 1st output only */
self.send([undefined,msg]) /* 2nd output only */

```

I think in this case, defining a new `msg` is not harmful

```auto
var msg = {};

```

But normally, you should append to/modify the incoming `msg`, not destroy it entirely - but as said, there is no originating `msg` for this.

PR your changes back to the original project - as others may find it useful, or if it's no longer maintained, fork it and create a derived alternative for download.

**EDIT**  
Also to label the outputs (I often forget about that until the end)

```auto
outputs 2,
outputLabels: ['Sheldon', 'Cooper']

```

---

<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:** [9 November 2023 15:43 UTC](https://discourse.nodered.org/t/send-a-message-from-a-custom-function-node-without-output-option/82308/30 "2023-11-09T15:43:03Z")

</div>

Closed on 9 November 2023 15:43 UTC

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

[Previous page](https://discourse.nodered.org/t/send-a-message-from-a-custom-function-node-without-output-option/82308.md?page=1)
