Looping with Collection

matuopm

Member
Is it possible to loop a collection and add a row to the collection inside the loop to prolong the looping ? I created the Loop with one row only and when I add a row before reaching the end of the loop. The function will only go one time through the loop.

View attachment test.png

Somehow it only works If I remove the add row and create the collection with x empty rows.
 

gil.silva

Active Member
Hello matuopm,

It's not possible to achieve that and even if you would add a row and then go through it, it will be an empty row, so it wouldn't be useful.

The typical way to manipulate collections while looping is to use 'Append Rows to Collection'. But to be clear, you can't add rows to a collection while looping.
 

matuopm

Member
The typical way to manipulate collections while looping is to use 'Append Rows to Collection'. But to be clear, you can't add rows to a collection while looping.

That's unfortunate. In my usecase I wanted to start with an empty collection and fill it up with strings until no strings are found anymore on my source.

My solution now is:
I create a collection with 50 empty rows and I put in a string in every row for every time I go through the loop. When no more strings are found I just leave the loop and delete all the empty rows.

I thought it would be possible to create a collection this way.
 

gil.silva

Active Member
Ah, I see.
Another way to do it, it's to concatenate the string in one data item and after the loop, you can use the action Split Text.
 
Top