Want to know if multiple strings are present in my string outpu

Hi Team,

I am getting 2 strings as output from my string manipulation. Screenshot given below

image

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

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.

image

1 Like

@KarthikByggari Thank you. I got it.

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

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