# Concatenate Two variable strings

**URL:** <https://discourse.nodered.org/t/concatenate-two-variable-strings/64604>\
**Category:** General\
**Tags:** function-node\
**Created:** [2 July 2022 05:44 UTC](https://discourse.nodered.org/t/concatenate-two-variable-strings/64604 "2022-07-02T05:44:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [2 July 2022 07:50 UTC](https://discourse.nodered.org/t/concatenate-two-variable-strings/64604/4 "2022-07-02T07:50:37Z")

</div>

As Craig suggested, I think you'll find you need to 'join' the two variables as although they are being generated continuously - they won't arrive or be processed by Node-RED simultaneously.

Take a look at this posting as it is very similar to your situation.

> [@Select minimum of two values](https://discourse.nodered.org/t/select-minimum-of-two-values/44775):
>
> Hi there, I am receiving two messages from mqtt, what I want to do is select the lesser of the two and output it to influxdb. I'm guessing I need to use a function but am unsure how to address two incoming message payloads inside the function. Can anyone please point me in the right direction? TIA

---

_[View the full topic](https://discourse.nodered.org/t/concatenate-two-variable-strings/64604)._
