For loop issue

As i use for each loop to loop through the strings and i need to store the items in a new variable
but if I try to store it saves the last element of a string.
Eg: My name is jack
if i loop through and store into a new variable it shows
jack only


Take another variable as MyFinalString and assign “” outside the for each loop.

Inside the loop in the assign activity you can use like

MyFinalString = MyFinalString + " "+currentRow(0).Tostring


My guess is that you are assigning the element of the string inside your for loop, so every iteration the content of the variable is overwritten until the last element which is jack. I would suggest to use a list variable and just use “add to collection” inside of your for loop