Boopathi
(Boopathi Manogar)
October 29, 2018, 11:38am
1
Hi Team,
I am getting 2 strings as output from my string manipulation. Screenshot given below
Now i need to know if there are multiple strings or single string in my output.
In the screenshot, i have multiple strings but not able to set any condition to identify that.
I used stringvar.lastindexof(ā\nā)>0 but it did not produced any expected result. Could anyone help me on this.
Thanks,
Ulaga
Use stringvar.lastindexof(Environment.Newline)>0
Boopathi
(Boopathi Manogar)
October 29, 2018, 11:59am
3
Hi @Vivek_Arunagiri
I gave first as stringvar.lastindexof(Environment.Newline)>0 but bot not considered it.
Thanks,
Ulaga
You can use string.Split(ā\nā) and store the values into an array. And make the decision based on array size.
Thanks,
Karthik Byggari
Check the length in write line for
stringvar.lastindexof(Environment.Newline).tostring
and
stringvar.lastindexof(ā\nā).tostring.
However you can also use generate Datatable activity. This can convert the String to Datatable. After converting you can use For Each Row to enter those values one by one in to the application.
1 Like
Boopathi
(Boopathi Manogar)
October 29, 2018, 12:11pm
6
@KarthikByggari Thank you. I got it.
Boopathi
(Boopathi Manogar)
October 29, 2018, 12:12pm
7
Hi @Vivek_Arunagiri Yes, i need to investigate further why it was not working as expected. Thank you for providing an another idea to iterate the string which i was not aware of.
1 Like
system
(system)
Closed
October 30, 2018, 12:12pm
8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.