Attaching data in datatable

Hi all,
I’ve a question, i’m using Reframework using TransactionNumber to iterate the GetTransaction, my TransactionNumber is the number of Room of my application, inside the process Transaction i’ll do all the operations of my room (divided in 6 step, so 6 invoke).
So i have 10 rooms in getTransaction who perform my 6 steps, in each steps i need to save some data inside a data table, and store them in an excel file at the last lap with all the data for my 10 rooms and 6 steps. (I put write range in excel file in THEN section of getTransaction, so when all rooms are managed).

My problem is: how can i attach the data manage of rooms inside the same datatable? e.x. 1st room so 1st lap manage 5 orders for each steps, at the second lap manage 10 orders for the 2nd room, i want to attach all the data and write in an excel file only when all is finished. But the error at the 2nd lap is: Add Data Row: Object reference not set to an instance of an object.", however if i try to build DT in every room(lap) it overwrite my orders of the previous round(lap).

Thanks in advance,
excuse for the length of the message :slightly_smiling_face:

@andreus91 Have you tried using Merge Datatable Activity? Then Write the Merged Datatable at the end to an Excel File?

1 Like

Yes, i want to do something like this.
But when i do the merge activity there is an error (one of dt are not an istance of object)

What are the activities inside my process?

  1. BUILD DT1
    2)ADD DATA ROW -array1 in DT1-
    3)MERGE -DT1 in DT2-

In this case we have that error.
Thanks in advance

@andreus91 What is DT2 ? How did you Create it ?

1 Like

Is the second DT for doing the merge, is correct? I’ve only create a variable type DT name DT2 and stop.
And at second run, i must pass inside “build data table again”? In case if i don’t pass through this activity my add data row failed with reference not set… (This at second run)
I don’t know how can i attach data at every run

@andreus91 I guess If you’re performing the above Steps you mentioned, You don’t need to use Merge Activity at all, All new Data rows will be Added to the DT1 variable, Hence Making it your Output.

I don’t Feel you need another variable as an Output :sweat_smile:

Where i am in process and perform for example 10 orders inside for my ROOM 1 it attach inside my DT1. My problem is.
When complete the operations inside process transaction and return to get transaction (increment my transactionNumber, so my room number) and go to process for ROOM 2, it pass again to build datatable and it doesn’t attach the 10 orders of my ROOM 1(transactionNumber1) to the orders of my ROOM2(TransactionNumber2).
I don’t know if is clear at all, otherwise ask me for more details.
Thanks in advance

@andreus91 Can you use Build Datatable before the Loop, Like in the Init Stage ? That way it won’t initialise again? Have you tried that ? :sweat_smile:

1 Like

Thanks for your help @supermanPunch
Yes, i used the build in init first run and change the role of my datatable in process transaction to in/out (i lost all the data because i put only out argument)
Thanks again, have a nice day! :slightly_smiling_face:

@andreus91 Is it Solved ? :sweat_smile:

Yeah buddy :wink:

1 Like

@andreus91 Ok, Good Going. :smile:

1 Like