# 4 ui buttons using single ui template node

**URL:** <https://discourse.nodered.org/t/4-ui-buttons-using-single-ui-template-node/63865>\
**Category:** Dashboard\
**Created:** [13 June 2022 13:15 UTC](https://discourse.nodered.org/t/4-ui-buttons-using-single-ui-template-node/63865 "2022-06-13T13:15:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KamranDurrani](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@KamranDurrani](https://discourse.nodered.org/u/KamranDurrani)\
**Post date:** [13 June 2022 13:15 UTC](https://discourse.nodered.org/t/4-ui-buttons-using-single-ui-template-node/63865/1 "2022-06-13T13:15:17Z")

</div>

Hello Sir I wanted to ask if there is a way to create 4 buttons using a single ui node. Each of these buttons are momentary push button. Currently for each button I am using 4 different templates node and combining them so that I could get a single output from the 4 buttons. I don't know anything about ui template node and java whatsoever. Thanks in advance

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [13 June 2022 18:38 UTC](https://discourse.nodered.org/t/4-ui-buttons-using-single-ui-template-node/63865/2 "2022-06-13T18:38:07Z")

</div>

Hi @KamranDurrani how will be your output for 4 buttons? or how would you like it?  
may be you do not need use a single template... for example, you can save the button value in an array, with a function node, to get a single output with 4 values...

**button 1 -\> array[0] = false/true**  
**button 2 -\> array[1] = false/true**  
**button 3 -\> array[2] = false/true**  
**button 4 -\> array[3] = false/true**

your output could be: _**array[index];**_  
it is only an basic example, but i do not know your logic or project!!

---

<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:** [13 July 2022 18:38 UTC](https://discourse.nodered.org/t/4-ui-buttons-using-single-ui-template-node/63865/3 "2022-07-13T18:38:37Z")

</div>

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