s3vn
(Joe Perri)
November 15, 2019, 10:50pm
1
Hello!
I have been banging my head against this for an hour and can’t seem to figure out what is going on. I am trying to combine 3 string variables into a single string, but when I type it into Notepad it adds an “enter” (new line) after each variable.
Thanks!
s3vn
Hi @s3vn , I’m sure there’s a better way to do it, but you can use the Assign control, see the attached image and file, hope it works for you.
Sequence.xaml (5.4 KB)
Hi @s3vn
Please make sure when you are fetching the vslue for these three values you have trimmed the trailing spaces.
Your variable contains that spaces. To confirm after fetching the values in variables just try to print that. You will see the difference.
Hope this helps.
Thanks,
Shenki
s3vn
(Joe Perri)
November 15, 2019, 11:54pm
4
Hi @ShenkiSinghai ,
I tried splitting the variables again to make sure there isn’t a trailing space and nothing changes.
Thanks,
s3vn
Can you please attach the screenshot how you are fetching these values.
Once you fetched the details with GetText activity, try with below. where ClientInformation is the variable where we are storing the output of GetText activity:
ClientId = ClientInformation.Substring(ClientInformation.IndexOf("Client ID: ") + "Client ID: ".Length).Split(Environment.NewLine.ToCharArray)(0)
ClientName = ClientInformation.Substring(ClientInformation.IndexOf("Client Name: ") + "Client Name: ".Length).Split(Environment.NewLine.ToCharArray)(0)
ClientCountry = ClientInformation.Substring(ClientInformation.IndexOf("Client Country: ") + "Client Country: ".Length).Split(Environment.NewLine.ToCharArray)(0)
s3vn
(Joe Perri)
November 16, 2019, 12:12am
7
I am assigning the variables this way:
GetDetailsSplit = Split(InfoDetails,vbLf)
CID_SPLIT = Split(GetDetailsSplit(2),": ")
(and repeated for the name and country)
Just try with my code, it will help you
s3vn
(Joe Perri)
November 16, 2019, 12:18am
9
@ShenkiSinghai
Thank you so much! I need to learn my vb script better, your code is working for me
1 Like
Anytime. Happy automation.
1 Like
system
(system)
Closed
November 19, 2019, 12:24am
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.