# Set ID's in the input number and use it inside the template with buffer.from

**URL:** <https://discourse.nodered.org/t/set-ids-in-the-input-number-and-use-it-inside-the-template-with-buffer-from/73462>\
**Category:** General\
**Tags:** node-red-dashboard, modbus, function-node\
**Created:** [10 January 2023 12:43 UTC](https://discourse.nodered.org/t/set-ids-in-the-input-number-and-use-it-inside-the-template-with-buffer-from/73462 "2023-01-10T12:43:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guudiin](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@Guudiin](https://discourse.nodered.org/u/Guudiin)\
**Post date:** [10 January 2023 12:43 UTC](https://discourse.nodered.org/t/set-ids-in-the-input-number-and-use-it-inside-the-template-with-buffer-from/73462/1 "2023-01-10T12:43:44Z")

</div>

Sorry for bad English.  
I'm trying to create a dashboard to command 60 ID's via TPC/IP.  
But I need help to set values ​​from 1 to 60, without having to keep changing the tamplate. Is there any way?  
Ex:  
msg.payload = Buffer.from([**0x0?** ,0x41,0x16,0x00,0x00,0xA8,0x38]);  
return msg;  
 ![print](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/7615fa66d085abf6154fca3bd2b66e54efda70d0.png)

---

<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:** [11 March 2023 12:44 UTC](https://discourse.nodered.org/t/set-ids-in-the-input-number-and-use-it-inside-the-template-with-buffer-from/73462/2 "2023-03-11T12:44:15Z")

</div>

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