Passing each row in a datatable as transactionitem


I’m trying to pass all rows in a datatable as transactionitems using the REFramework.
I tried doing so like that:

The problem I’m facing is that when I run the bot, it processes the same row (the last one) of the datatable over and over again.

Any suggestions on how to fix this?



Because here you used loop and it will assign one by one row to out_TransactionItem till last row. So, when going to Process TransactionData state it contains last row value only. Because of that its doing like that.

Don’t use For Each Row loop here. Instead of that try below way.

  1. First read data from input source in Init state and pass that output DataTable from Init state to Get TransactionData state.

                  IF in_TransctionNumber <= inputDT.rows.count
                out_TransactionItem = inputDT(in_TransctionNumber - 1)

In one iteration, it will read one row and pass it to Process TransactionData state and will process it. Once completed again it will go back to Get TransactionData state and will read next transctionItem. This process will continue till last transaction item found.


@lakshman thank you, this works fine! :slight_smile:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.