# Building a 3 element array from "form" and "dropdown" nodes to send on button click

**URL:** <https://discourse.nodered.org/t/building-a-3-element-array-from-form-and-dropdown-nodes-to-send-on-button-click/30385>\
**Category:** General\
**Created:** [20 July 2020 09:45 UTC](https://discourse.nodered.org/t/building-a-3-element-array-from-form-and-dropdown-nodes-to-send-on-button-click/30385 "2020-07-20T09:45:39Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![zazas321](https://avatars.discourse-cdn.com/v4/letter/z/59ef9b/32.png) [@zazas321](https://discourse.nodered.org/u/zazas321)\
**Post date:** [20 July 2020 11:50 UTC](https://discourse.nodered.org/t/building-a-3-element-array-from-form-and-dropdown-nodes-to-send-on-button-click/30385/12 "2020-07-20T11:50:05Z")

</div>

I have also found out a new problem:

 ![2020-07-20-144749_1920x1080_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4cc3526a8acd4db2c355e591a39e788e62a3782d.png)

I have changed the switch function when the button is clicked to output msg.payload instead of payload array and the result is very strange. I am getting all kids of data ( even the data that I have not recently used as input) which implies that the DBdata is not cleared when i restart the flow. How to prevent this from happening?

---

_[View the full topic](https://discourse.nodered.org/t/building-a-3-element-array-from-form-and-dropdown-nodes-to-send-on-button-click/30385)._
