# How can i mention my "ui-button" code in the function node when it is pressed?

**URL:** <https://discourse.nodered.org/t/how-can-i-mention-my-ui-button-code-in-the-function-node-when-it-is-pressed/64819>\
**Category:** Dashboard\
**Created:** [8 July 2022 07:51 UTC](https://discourse.nodered.org/t/how-can-i-mention-my-ui-button-code-in-the-function-node-when-it-is-pressed/64819 "2022-07-08T07:51:43Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![JackJackTan414](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@JackJackTan414](https://discourse.nodered.org/u/JackJackTan414)\
**Post date:** [12 July 2022 00:39 UTC](https://discourse.nodered.org/t/how-can-i-mention-my-ui-button-code-in-the-function-node-when-it-is-pressed/64819/6 "2022-07-12T00:39:58Z")

</div>

Hi, sorry for the misunderstanding. The msg.topic contains "variable" values that is generated through the OPC-UA client node. And i would like it to display the data on the MySQL database only when i press the button on the dashboard.

The second image shows the code im trying to implement in the function node after the button node. This is what i meant by both the "msg.topic" and "msg.payload" are pre-occupied with values.

The third image is part of the configuration page of the ui-button node. there is only 2 term here that can be delivered upon button pressed. is there any other term that i can use other than these two?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a688da9a77dcae936ccab4b8affb51ed8af7408.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/be4e8f6af8c73dbe1fbe8d3a1898a75e912b7422.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e815c2b4478c78a6bf24becb1e9d83027b4d9f7.png)

---

_[View the full topic](https://discourse.nodered.org/t/how-can-i-mention-my-ui-button-code-in-the-function-node-when-it-is-pressed/64819)._
