Compile all data with Add data row activity

Hi Experts,

Do you know how to compile all data from two data tables into a new data table with Add data row activity? Or is there any other method?
I could not use join data table activity since there is no condition to join those data tables. Copy() function will not working for more than one data tables.

Thank you.

Can you share the sample input and expected output

@D_Okthree

Hi @D_Okthree

  - Build Data Table (to create your new data table)
  
  - For Each Row (in DataTable1)
    - Add Data Row (to add the row from DataTable1 to the new data table)
  
  - For Each Row (in DataTable2)
    - Add Data Row (to add the row from DataTable2 to the new data table)

Regards,

Hi @D_Okthree ,

User Merage data table activity.

Thanks,

Hi @RajKumar_DC ,

The result is strange since the total of merged data row should be 35
(dtA row = 31, dtB row = 4).
However, the final result in the data table destination is total data row = 66.

image

How this Merge data table activity works?

can you share the sample input and output for better giving solution

@D_Okthree

@Praveen_Mudhiraj ,

The sample of those 2 data tables:

dtA:
image

dtB:
image

both compiled to dtC and the total data row in dtC should be 35 instead of 66.

@lrtetala ,

I tried that but I got an error message during execution about “data row is already belong to another data table” when I use for each currentRow in add data row activity’s Data Row property.

Do you know how to fix it?

@D_Okthree

Please find the below xaml for your reference

BlankProcess10.zip (64.7 KB)

Hope this helps!!

Hi @D_Okthree ,

can you plz share your workflow.

Thanks,

Hi @D_Okthree,

check below workflow.

DT1
image

DT2
image

after merge the datatable.

image

it will append the table

workflow

Thanks
,

You don’t do it with Add Data Row.

Have you tried the Merge Data Table activity?

@postwick ,

Yes, I have. However, the result of total data row in destination table is double. The total of merged data rows should be 35 but the result is 66 total data rows. I also replied the detail above.

@RajKumar_DC ,

More or less is same:

  1. Get data from 2 excels and store it in 2 data tables
  2. Merge data into a destination data table.

That’s why it is strange that the result is 66 instead of 35.

image