I have a DataTable of scraped items from a portal, however, there are some which will not be required. I therefore want to write the required items to a new Data Table so I can filter out the ones I don’t need.
How would I go about writing these to a new table? I tried a ‘for each row’ with an ‘if’ activity to select the items I wanted, however, it tells me that it cannot write to a new DT if iterating through another.
You can try ‘Filter data table’ activity & provide the conditions based on which you can obtain the desired result. Also, you can use LinQ query to achieve the same.
If you want to get less no. of columns only and of course specifc rows then you can Build A new DT with those columns name and inside your for each row for a condition; use Add data Row.
In ArrayRow property put {CurrentRow(0).ToString, CurrentRow(1).ToString…} so on.
These no. of elements inside { } should be equal to your New DT’s column count, and you can use different Index to take columns value from original DT.
Am I doing something wrong with the filter wizard here? I essentially need to remove the row (of column 0) if the value is a set variable or the bottom text. I ran it, it doesn’t error, but it also doesn’t remove it.