Object to specific string

Dear Community, i am using Node Red since 3 Months now and did a good learning on it.
But i am stuck all day long, and not quite good @ js.
I Have a SMS Gateway Which accepts a payload of: NUMBER_TEXT_. e.g: +46887656_Test SMS _
The underscores are for the gateway to know waht is sms and text.
I have problems to do concatenation...

I want to use a form (dashboard) to send sms.

Form gives following object:

msg.payload : Object
Number: "1234"
Text: "test"

I tried following via function:

var txt=msg.payload.Text
var nmbr=msg.payload.Number

var msg1 =
var msg2 =

msg.payload = "";
msg.payload += msg1;
msg.payload += "";
msg.payload += msg2;
msg.payload += "
return msg.payload;

Can anyone help me to concat taht string??? I am Totally stuck ...

Well you could use a function and do

msg.payload = msg.payload.Number + "_" + msg.payload.Text + "_";
return msg;

To concatenate the two parts - inserting the underscores that you seem to need also.

hy, thankks tht worked!!
Sorry, still on learing the basics...

regards node-n00b

A slightly less "programming-language" way to do this would be a simple template node --

it uses mustache syntax to do variable replacement within the surrounding text, so your use case could be written as {{payload.Number}}_{{payload.Text}}_

Note that the leading msg. needs to be left off of your variable names, since the entire msg object is already used as the source of those variables