Loop through one DataTable and specific row to another new DataTable

Hi,
I have one scenario where I am reading one excel file (which has 4 columns) and the extracted the data into one datatable say DT1.
Now, I used for each row to iterate through DT1 and Get row item activities and used if condition activity to filter some data.
If that condition is met then I need to add first and second columns only to a new datatable which is DT2.
How will achieve this, any help on this ?

use add datarow to add rows to the other table dt2
on the setting row Array use: {row(0),row(1)}

ensure that dt2 is already initialized and prepared holding the right column structure (e.g. do it with build datatable)

A variant to your flow would be:

  • use fitler datatable
  • configure the rows keeping setting as in your if condition
  • configure the cols keeping setting to first and second column
  • output it to dt2 Variable
1 Like

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