Row delete in DataTable


I have create a datatable from screenscrapping, i want to remove some rows on the base of the length. And want the output as a datatable. Please let me know how can i achieve that.


Hello @Dany069

You can loop through the data table using a for each row activity and inside that use an if activity to check your desired condition and remove row appropriately something like -

If row(“Name”).ToString.Length>20 then use activity Remove Data Row



The remove data row didn’t work in For each row.


What error are you getting?


There is no error but the datatable give the output as blank. There is no row write in the datatable


If possible can you show me some example so that i can relate the same


Hi @Dany069,

DataTable.Select("LEN([ColumnName]) > 5").CopyToDataTable()


Here you go @Dany069
I’m assuming here that we’re deleting a row if the length of item in column “ID” is less than 5.

test.xaml (6.6 KB)


@Rishabh_Lakhera Yes but after deleting the rows. I want another Data table to create with remaining rows.


Well in that case what @3726 said should work just fine :slight_smile:


thanks for your help @Rishabh_Lakhera and @3726 issue resolve