# I need help with a output

**URL:** <https://discourse.nodered.org/t/i-need-help-with-a-output/699>\
**Category:** Dashboard\
**Created:** [8 June 2018 15:44 UTC](https://discourse.nodered.org/t/i-need-help-with-a-output/699 "2018-06-08T15:44:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ItsLarsBB](https://avatars.discourse-cdn.com/v4/letter/i/ea5d25/32.png) [@ItsLarsBB](https://discourse.nodered.org/u/ItsLarsBB)\
**Post date:** [8 June 2018 15:44 UTC](https://discourse.nodered.org/t/i-need-help-with-a-output/699/1 "2018-06-08T15:44:41Z")

</div>

how can i change the output to #hex

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

---

<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 June 2018 15:54 UTC](https://discourse.nodered.org/t/i-need-help-with-a-output/699/2 "2018-06-08T15:54:01Z")

</div>

Hi @ItsLarsBB

You could use a Function node configured with:

```
msg.payload = "#"+msg.payload;
return msg; 

```

The Function allows you to write JavaScript that is run against each message it receives.

[https://nodered.org/docs/writing-functions](https://nodered.org/docs/writing-functions)

If you’re going to spend much time with Node-RED, it’s worth familiarising yourself with some of the basics of [JavaScript](https://developer.mozilla.org/bm/docs/Web/JavaScript)

Other options include…

You could use a Template node (normal template, not dashboard template) configured with:

```
#{{payload}}

```

You could use a Change node to set msg.payload to the expression `'#' & $.payload`

---

<div class="post-metadata">

**Author:** ![ItsLarsBB](https://avatars.discourse-cdn.com/v4/letter/i/ea5d25/32.png) [@ItsLarsBB](https://discourse.nodered.org/u/ItsLarsBB)\
**Post date:** [8 June 2018 18:13 UTC](https://discourse.nodered.org/t/i-need-help-with-a-output/699/3 "2018-06-08T18:13:05Z")

</div>

Hi @knolleary

Thx 👍

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [8 June 2018 18:22 UTC](https://discourse.nodered.org/t/i-need-help-with-a-output/699/4 "2018-06-08T18:22:18Z")

</div>

The `change` node can also use a **regex** to modify the string -- like so:

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

(the regex character `^` matches the beginning of the line)
