I am putting together a workflow that compares the headers of two data tables in a for each loop and if they match then add the column from data table two to a new blank data table. If they do not match, add the column from data table one to the new data table.
The issue I am having is the Add data column activity taking a variable that holds the entire data column of either data tables. I can get the new data table to output the column headers but not the column data. Please see the below workflow screenshot.
a datacolumn datatype represents the definition of it, but not its data values
this part is not clear
we would understand so far that based on the column name (comparing 2 datacolumn variables will not match as the objects are of different identities / instances) it should be added to a datatable or not.
One strategie could be to identify the datacols with common names between two datatables and creating a string array of it. Then use the DataTableVar.DefaultView.ToTable(False, arrCommonColNames) and have it into a new datatable. Any other values we cann add / merge afterwards as well