Input to Datatable in REFramework

Hello ! need some help,

i have a process in REFramework. In stage “Process Transaction” firstly i Build a Datatable then do some operations with each item in a queue and then i need to write each data to Datatable which i created above

so i have 2 question:

  1. As i think the algorithm creates a new table every time when new transaction arrives from the queue and i dont know how to do it correctly

  2. How can i add new arrayrow (in action “add data row”) in a row.

And when i saw my output table i dont know why it contains only 1 row. Its because i create table every time or because “add data row” works differently…

so for better understanding what I need: Get Transaction item( i did it) —> process itadd it to datatable ( dont overwrite but add)

Help pls!

Yes, you are correct. The datatable is created everytime you invoke Process Transaction. To avoid it you need a global variable. Declare the datatable variable in you main workflow instead and pass it to Process Transaction as an argument. The direction for the argument should be In/Out.

Also, you need to make sure that the Build Data Table is only run once, e.g. by checking if the argument is null.

If (io_DT Is Nothing)
    Build Data Table

Thank you, i will try it
How does “add data row” works? I also thought there was a problem with him that it adds a line removing all that were. Or it descends himself and adds a new row on each iteration?

Add Data Row adds a new row so it should work fine if you implement the other changes.

1 Like

Thanks u a lot ! :grin:

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