Multiple Array rows into Single String

Hoping someone can give some guidance here.

I am scraping the body of email to array, arrText.

I am then breaking each row out into it’s own string variable. This all works great. The one issue I have is that everything after a certain row I want to be in a single string. So say I have a variable for line 1, arrText(0) and for row 2, arrText(1) but I want everything from row 3 on to be in a single string variable.

How would I do this? Thank you!

Hi @Chris_Livesay

U can use this way

  1. First initialise a variable let’s say result equal to “”

  2. Use for each activitiy to loop through each element of array , in the property panel if for each activitiy there is index property assign a variable let’s say index which stores the index of each element of array , for each item in array,

Inside the for each use the following activity

  1. Use if activity with condition as index <3

If the condition is true then in then section do nothing

If the condition is false then in else section use the following assign activitiy

result= result+item

In this way u can try

Hope it helps you

Regards

NIVED N :robot:

Happy Automation :slight_smile:

I think this gets me closer. How could I find the last row in an Array?

Hi @Chris_Livesay

let’s say array varible arr

To find last element of array use the following code

arr(arr.count-1)

Try this way

Hope it helps you

Regards

Nived N :robot:

Happy Automation