Not able to add multiple rows in collection

Shashank2020

New Member
Hi friends, I am new in the blue prism. This is my first post on this forum.

I am getting two values in two data items which I want to add into the collection on by one. I have used Add row action of the Collection object and then used multi calculation stage to store both values in the collection. I have used a defined collection with two fields already added. But every time it overwrites previously written row and stores only current values in the row.
So, please help.
 

gil.silva

Active Member
Hello,

You need to use a Loop stage with your Collection.
Then, within the loop, you can use the Calculation stage to set the value for each row.
 

Shashank2020

New Member
Hello,

You need to use a Loop stage with your Collection.
Then, within the loop, you can use the Calculation stage to set the value for each row.

Thanks for the help. I added the add rows action stage inside the loop but in the main page of the process. So, that solved my problem.
But one question still remains, that when the add rows action stage was in the subpage of a process, the current row of the collection was being overwritten with the previous row but when I added the whole thing in the main page, all the rows were added in the collection without any row being overwritten. Is that because the values in the rows were not preserved when the call was transferred from sub page to main page?
Someone please answer this.

Thanks
 
Top