How to log entire FOR EACH ROW into single message box?

Hello Uipath Forum,

I am using FOR EACH ROW activity for looping through a DATA TABLE but I do not want to log MESSAGE BOX every time the loop happens. I want all looped values in one MESSAGE BOX.

Below is my workflow:

I hope you are getting what I am trying to say.
Let me know if you did not understand what I just described above.


@Venkatesh_Paskanti I got you. Try to use Output data table activity after for each row. Pass your data table name(Input field) and string variable (Output field) in the properties of that activity. In message box print the string variable. All these should happen after for each row

Hello @ushu,

Thank you for replying

But if I use OutputDataTable then in that case I have to pass DataTable in the input field right?

Here I am printing this (“stockName +” - Open: “+ openPrice + " &”+" Low: "+ lowPrice) in the ForEachRow inside IF condition.

So could you please guide me how to achieve my desired results?

Thanks & regards

You can create another datatable to add the condition satisfied data using Add Data Row activity inside the if condition

Then you can use output data table as @ushu said

Hi @Venkatesh_Paskanti ,

Another solution for this would be usage of collections. Please find the image. In add to collection item property you can provide the (“stockName +” - Open: “+ openPrice + " &”+" Low: "+ lowPrice)

@Venkatesh_Paskanti Is Message Box mandatory. If you want to print the values why don’t you try with log message activity instead of message box since it will not give any pop up during execution


The thing is whatever satisfied values I am getting I have to bundle the same and send that whole satisfied strings to my phone via twilio sms service.

If I use twilio inside an IF condition then it will send each satisfied string again and again which will cost me a lot.

I hope you are getting what exactly I am trying to say.

Hi @Rangu_Pranaviteja

Thanks for solution but I am not able to achieve expected results using ADD TO COLLECTION.

@Venkatesh_Paskanti ,

Could you confirm how the desired output should be.


Please refer recent reply to Ushu.

I hope add to collection is placed inside if block and the message box(In use case i.e., twilio) should be outside if block and for each row.


Yes I did the same