2 output to message box help

As you can see it wont accept that string that you posted.
I created 2 quick variables, wrote them both to a single msg box on 2 seperate lines, this works fine…

Screenshot 2022-04-23 175407

Screenshot 2022-04-23 175434

These Must be concatenate if they are of string type variable(by seeing the name of variable). This isn’t giving error. PFB SS -

image

Hi Guys,

A couple of more shots might help.
The data type of both the vars.
The output var for the CompanyName.
Lastly another try…

Screenshot 2022-04-23 180624

Hello,

Can you please try like this in the advance editor of message box:
Saved.Values(Of System.String)(“Day”)+Saved.Values(Of System.String)(“Today”)

Note: I have declared the variable as string, so I used System.String. Please replace it with your variable type.

Thanks!
Athira

Hi,

Those 2 vars, Day + Today were just to prove that I could print 2 messages in the same msg box so please ignore.
Its these 2 in the screenshot that im getting the error.

Thank you.

Please Replace Day and Today with “CompanyEmail(0).ToString” and “CompanyName(0).ToString”.

Thanks!
Athira

Hi,

Sorry but im not understanding that string, ive tried it anyway, im sure ive errored it.
My 2 vars are.
CompanyName(0) and CompanyEmail(0)

Thank you

Saved.Values(Of System.String)(“CompanyName(0).ToString”)+Saved.Values(Of System.String)(“CompanyEmail(0).ToString”)

Can you please hover over error icon and see what’s the error? Also, try to remove .ToString and see if error is different.

1 Like

Hi,

Tried removing the .ToString but still an error.
Please find shot of before I removed the .ToString.
Thanks for your help its much appreciated.

Screenshot 2022-04-23 185627

It’s weird. Can you please hover over the error you are getting when you try to concatenate both variables like this. Ideally this should work:
CompanyEmail(0)+CompanyName(0)

Thanks!

1 Like

I know right :rofl:

Ive tried both + & none of these worked.
I think StudioX has difficulty in doing this, UiPath state quite clearly the Match function is prone to errors in StudioX.

Getting Closer…

Screenshot 2022-04-23 191438

Can you please add .ToString as well? If still an error is coming, please provide me the screenshot.

Thanks!

1 Like

No error, please find msg box.

“CompanyEmail(0).ToString " + " CompanyName(0).ToString”

Screenshot 2022-04-23 192446

Not inside double quotes. Can you try without quotes?

Thanks!

1 Like

Yesssssssssssssssssssssssss !!!
Thank you so much, that drove me crazy !! :rofl:

CompanyName(0).ToString + CompanyEmail(0).ToString

Screenshot 2022-04-23 194225

Could you help me get the 2nd value on new line please, as in

Amazon
info@Amazon.com

Many thanks again :heart_eyes:

Glad it worked! :grin:
For new line use like this:
CompanyName(0).ToString + Environment.NewLine+CompanyEmail(0).ToString

Thanks!
Athira

1 Like

Grrrrrrr I knew it was Environment.NewLine but didnt realise I needed + either side of it !! :roll_eyes:

Thank you so much for sticking with me, its much appreciated :grinning:

Screenshot 2022-04-23 202235

1 Like

Glad to help! :grin:

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