# Value format don't accept readUint8

**URL:** <https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008>\
**Category:** Dashboard\
**Created:** [27 August 2022 15:51 UTC](https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008 "2022-08-27T15:51:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marchal-web](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marchal-web/32/66937_2.png) [@Marchal-web](https://discourse.nodered.org/u/Marchal-web)\
**Post date:** [27 August 2022 15:51 UTC](https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008/1 "2022-08-27T15:51:07Z")

</div>

Hello All,  
I have an issue with Format value of an edit text node. The edit text node receive a buffer of 8 bytes from an UDP port.  
I would like to display the first field of the buffer. to do that I set Format Value of the Edit Text Node with:

```auto
{{payload.readUInt8(0)}}

```

That doesn't work in the edit text node. but in a function that's work fine:

```auto
var value = msg.payload.readUInt8();
var newmsg = { payload: value, topic: "first" };
return newmsg;

```

What am I doing wrong ? Could you please help me ?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [27 August 2022 16:01 UTC](https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008/2 "2022-08-27T16:01:18Z")

</div>

The value field only accepts a msg path, not a javascript method.  
You would need to use your function before the ui-text node to and then use {{value}} or {{msg.payload}}.

---

<div class="post-metadata">

**Author:** ![Marchal-web](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marchal-web/32/66937_2.png) [@Marchal-web](https://discourse.nodered.org/u/Marchal-web)\
**Post date:** [27 August 2022 16:06 UTC](https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008/3 "2022-08-27T16:06:41Z")

</div>

Ha damn!  
Thanks for your answer

---

<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:** [26 September 2022 16:06 UTC](https://discourse.nodered.org/t/value-format-dont-accept-readuint8/67008/4 "2022-09-26T16:06:59Z")

</div>

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