How to Delete or Remove Data Row using a WHILE LOOP

Hi, Can i know what the properties inside Remove Data row activity?

@mashy2
You have the option to use either a DataRow or Row index in the ‘Remove Data Row’ activity. Ideally, you would use a DataRow inside a generic ForEach using an array of DataRows (I do not recommend using a Do while)
which in practical use would look something like this:

For each row1 In dtVariable.AsEnumerable.Where(Function(r) r("Amount").ToString.Trim="").ToArray
    Remove Data Row: row1 in properties

So, this example would loop over all rows where the amount is empty, and remove those rows. you should implement this with how it works for your process.

You can not remove data rows while looping a data table, from my understanding, since you would be changing the source table which you are looping. (ie ForEach row in dtVariable)

As an alternative approach, you can simply filter out the rows, so no looping required in this approach:

Assign arrFiltered = dtVariable.AsEnumerable.Where(Function(r) Double.TryParse(r("Amount").ToString.Trim, Nothing) ).ToArray

then, perform some actions over that array of rows. In my example, it stores all rows where the Amount is a number to an array of rows. If you want them back to a table, simply use an IF:

IF arrFiltered.Count > 0
    Assign dtVariable = arrFiltered.CopyToDataTable

You can also use the Filter Data Table activity instead of this approach, but from my experience, it has less capabilities.

Note: all examples are pseudocode using activity names.

Regards.