# 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:** 11

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 July 2022 11:24 UTC](https://discourse.nodered.org/t/how-can-i-mention-my-ui-button-code-in-the-function-node-when-it-is-pressed/64819/11 "2022-07-14T11:24:46Z")

</div>

Looks like Jack has opened a second thread with the same question

> [@How to deliver variable value to different flow when ui-button is pressed](https://discourse.nodered.org/t/how-to-deliver-variable-value-to-different-flow-when-ui-button-is-pressed/65081):
>
> Good day Guys. The first 3 image represents that I am trying to initialise a global variable "a" to be 1 whenever i press the button. And the value represented by variable "a" will be stored as "msg.test" and to be used in other FLOW. The last 3 image shows the other flow that I am trying to obtain the variable "a" value into this flow. But when i press the button on the dashboard, I want this flow to show its message on debug node right away WITHOUT clicking on the inject node. P/S: The reas…

@JackJackTan414 Please done post the same question more than once, it wastes people's time.

---

_[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)._
