No worries
Hope these steps would help you resolve this
—Inside the IF activity If the condition gets true it will go to THEN apart I hope
—So inside the THEN part use a ADD TO COLLECTIONS activity
—Where in that activity property panel along the collections property mention as list_rowindex where list_rowindex is a variable of type System.collections.generic.list(of int32) with default value New List(of integer) defined in the variable panel and in the item property mention as yourdatatablename.Rows.Indexof(row) where row is a variable used in your for each row loop
—so the row index will get added to this list variable
—now next to this for each row loop use a For each activity and pass the input as list_rowindex and change the type argument as int32 in the property panel of for each loop activity
And inside the loop use REMOVE DATAROW activity and mention the rowindex as item and mention the datatable name in the datatable property
Use another REMOVE DATAROW ACTIVITY and mention the rowindex as item and mention another datatable name in the datatable property so that now the row will get deleted in both the datatable
Fantastic
Then we can keep one REMOVE DATAROW ACTIVITY alone and mention the datatable from which we need the row
And remaining process is same and last step within the for each loop will alone change
Cheers @ganesh_rajan
Yah the expression is fine but we cannot use REMOVE DATAROW ACTIVITY inside thr for each row loop as we are currently iterating through each row in the datatable and meanwhile we won’t bale to delete the rows in it and that why Ymir’s was showing that error.
So we need to get the row index now using add to collections activity and use a separate for each loop activity and pass the variable used in the add to collections- as input here in for each loop activity and then use remove datarow activity inside the loop
Same as these steps