Hello I have a data table I am trying to filter based on a digit in the third digit location. There is only one column so I just need to point to the third digit and if it matches export the row. I figured using the filter data table may be faster than a for each loop since the file has a lot of rows. Is it possible to do it this way ?
Ex:
col(0)
42268594674 xxxxxxxx yyyyyyyyyy
34768473245 xxxxxxxx yyyyyyyyyy
19287645689 xxxxxxxx yyyyyyyyyy
I want the filter data table to keep the entire row data for 42268594674 and 19287645689 but leave the other data row.
:filter output into new DT
42268594674 xxxxxxxx yyyyyyyyyy
19287645689 xxxxxxxx yyyyyyyyyy
the logic step is working correctly (thanks ! ). I am having issues getting the data row exported. The preferred method would be to add a row to the data table and export the entire thing at the end of the for each row.
Here are my current steps, still trying to figure out how to export the line.
First, assign a new datatable set to DT1.Clone before you start iteration in your For Each Row loop. Then use the Add Row activity and pass this to the ArrayRow parameter: row.ItemArray.
@jarrettd88 Can you try using this Query :
in An Assign Activity Use this :
DT = DT.AsEnumerable.Where(Function(x)x(0).ToString(2).ToString.Equals(β2β)).CopyToDataTable