Loop and copy certain data into variable

Hi Guys,

I’m looping the some activities within a terminal.

Basically the robot need to check the screen title is “ibibmt1s/51”, if yes then the robot should “Ctrl + T” to delete the record and continue looping.

However, I want the robot to store all the invoice number which was delete, in a variable (Variable name: delExtraCharge). So that I can create a list in a txt for all the invoice number which was deleted for audit purpose.

So since it is looping, I only get the last invoice number which was deleted, and not all the invoice number which was deleted. It is overwriting the variable for each loop.

Loop #1: Copied invoice number - 123
Loop #2: Copied invoice number - 125

Output: 125
Desired output: Variable1: 123 & Varibale2: 125

Can anyone help me on this please?


Can I use add to collection activity?

Hi @Serran_Neru

Yes use Add to Collection activity use Build Datatable to add the values

Ashwin S

Hi Ashwin, Thanks for your reply.
But how do I get back the data from the collection?
I’m blur on how to use it.

Hi @Serran_Neru

Use Output Data Table that will give you the result

Ashwin S

Hi Ashwin, after build the data table, how do add those collection into the data table?

Hi @Serran_Neru

First use
1.Build Datatable activity and then add columns and give Datatable
2.Add to Collection activity and give the datatable or use Add data row activity
3.Output Datatable activity to print the exact result

Ashwin S