Need to Retrieve the next line from the Array

Hello All,
Below is the scenario, Were i require you support to complete this.

I have extract the PDF data to text file and i need to get the specific data from the txt file.

Attached snapshot, In that i need to get the 2 line(State name). In some scenario state name is not available so then the 3 line will placed at 2.


Kind Regards
Kabeer Ahamed B

So suppose if we are getting the text like this alone
str_input = “CustomerName
HSN Code

So now use a assign activity like this
list_string = str_input.Split(Environment.NewLine.ToArray()).ToList()
Where list_string is a variable of type System.Collections.Generic.List(of string) defined in the variable panel with default type as New list(of string)

So use a IF condition like this
If true it will go to THEN part were use a assign like this
Str_output = list_string(1).ToString
If the above condition fails it will go to ELSE part where we can use a assign activity
Str_output = String.Empty

Cheers @Kabeer

Thanks Palaniyappan,
Let me try.
Whether we call multiple array in single output.
Peter’s Road Royapettah Chennai 600018

If i have splitted the string as per “space” then
Then my array output will be
Peter’s Road Royapettah Chennai 600018
0 1 2 3 4

I need to get 0 & 1 separate and 3 separate and 4 separate.

whether it can be possible! Waiting for your support

Yah that’s possible
But we need to mention the index and concatenate them

And in your case ensure that the string format is same else we will be facing issue while using this split method like though it splits it won’t give us the required output

Kindly try once and let know for any queries or clarification
Cheers @Kabeer

1 Like

Thanks Palani,
Its working. Whether we can get the pincode without the split function.