How to type into Datatable

Hi team,

I want to add data from different data tables’ column to the new data table (the data table that I am building). I have the following scenarios.

  • Data of one column comes from another data table and
  • Data of the remaining columns come from the transaction item

I want to know how to load data from these different sources.

Thanks!

Hi @Sisay_Dinku ,

After you get the data from the data table’s column, pass it on to the new data table by using an Assign activity. Example:

newDataTable(“ColumnName”) = otherDataTable(“Origin Column”).ToString

In the example above, I am passing the value of the “Origin Column” of the “otherDataTable” data table to the “ColumnName” column with of type String.

This will add value at the end of the table. Or are you trying to add it to a specific row?

Hope this helps.

Kind regards,
Kenneth

Hi @Sisay_Dinku

Build a datatable finalDT which has all the columns that you need. Iterate through the datatable that you already have using For Each Datarow activity. Now use Add Datarow activity to add the row as an input array to the finalDT:

{row(“column1”), transactionItem.Variable1, transactionItem.Variable2, …}

Hope this helps,
Best Regards.

@Sisay_Dinku

You can create a separate xaml and then add the data as argumnets and link the arguments according to thw columns that you have in the report…so that for each row you can send any combination from datatable columns and transaction item

Hope this helps

Cheers

Thanks @Anil_G
This has worked!

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