# Creating a message using fixed strings and strings typed in a text box

**URL:** <https://discourse.nodered.org/t/creating-a-message-using-fixed-strings-and-strings-typed-in-a-text-box/51761>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [1 October 2021 16:43 UTC](https://discourse.nodered.org/t/creating-a-message-using-fixed-strings-and-strings-typed-in-a-text-box/51761 "2021-10-01T16:43:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quevedo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/quevedo/32/46503_2.png) [@Quevedo](https://discourse.nodered.org/u/Quevedo)\
**Post date:** [1 October 2021 16:43 UTC](https://discourse.nodered.org/t/creating-a-message-using-fixed-strings-and-strings-typed-in-a-text-box/51761/1 "2021-10-01T16:43:33Z")

</div>

Hello,

I am using the dashboard plugin to generate control messages to be sent to a remote system by MQTT. I will give the example of one of the control functions, as the others are similar in structure.

If I want to set the Real Time Clock of my remote system, I will send a MQTT message to a specific topic, and this message is something like:

"password","HH:MM:SS"

where "password" is a password to be sent so only admins can change the RTC, and "HH:MM:SS" is the current time. The message must include the quotes.

I want to have a dashboard with one text box to type the password and one text box to type the current time. Then I want the flow to react when current time is typed (not the password), or when a button is pressed in the dashboard. Reaction must be sending a concatenation of password and current time, and also quotes and comma, and the sending of the whole string to a MQTT out.

I want the content of the password text box to be stored, because it will be used in other commands. A string variable, maybe?

So, any hints, or maybe a step-by-step for doing all these tasks? I consider myself still a newbie in node-red.

Thanks in advance.

---

<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:** [30 November 2021 16:44 UTC](https://discourse.nodered.org/t/creating-a-message-using-fixed-strings-and-strings-typed-in-a-text-box/51761/2 "2021-11-30T16:44:03Z")

</div>

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