I have strings that I want to remove from a 2 dimensional data table. Help?

Here is what I need help with, spent the last hour trying to figure out :frowning:

i have a datattable called dt_users which is like this

Ahmad | 9199191
Bob | 3293993
Ryan | 299292

I am looping through some name and phone number strings. I will need to remove all the rows that have the name and corresponding phone number from datatable dt_users.

Here is what I tried

  1. Build a datatable dt_temp
  2. Everytime I loop, add the name and phone number to the dt_temp
  3. Remove the 1st data row in dt_temp as when creating it in (1), I will have to include a useless row
  4. Loop though dt_temp and remove each row from dt_users. However, I am unable to do so.

I understand that what I am trying is clunky/ there is probably a better way to do this, so I am seeking help and advice. Thank you all good sirs and madams.

You have one datatable, with two columns, name and phone number and you need to delete the rows that are having both column values?

Is this correct?

If yes, then just use filter datatable, select rows and click on radio button “Keep Rows”. In below condition, put “Name” = “” OR “Phone Number” = “”

This will keep only rows that have either name or phone number or both empty.

If there’s something else you are trying to do, please give us clear understanding

I have one datatable, with two columns, name and phone number.

I have another datatable, same format. As i iterate it, depending on a specific condition that I have, I want to remove certain rows from the abovementioned datatable. What is the simplest way to do this?

As I do a for each row in datattable #2, depending on the values in the row, I want to remove them from datatable #1.

Thank you so much for helping Rahul. Bless you

You need two activities, for dt1 (aclled users) and dt2 (other users):

  1. Join activity, with left join dt1 and dt2, result in dt3, join on what works with your data
  2. Filter from dt3 where attrib ist empty or not (up to what you want)

Hi sir, sorry i dont really follow. I try explain better now, sorry for poor english.

I have a datatable with username and phone model number. Example
Ryan | 1022
Ryan | 3011
Bob | 2022
Bob | 1022
Bob | 3011

I am navigating to a website to check for the availability of each username and corresponding phone number.

So for example, if the website has
Bob | 1022
Ryan | 3011
Bob | 3011 available, at the end I want to have a datatable that just has

Ryan | 1022
Bob | 2022 remaining. How do i go about doing this? I cannot just remove based on name or phone model alone as some users have the same phone model number. Sorry that I wasnt clear in the original post.

Right now what I am doing on the website is iterating through each row of the original datatable to check whch user and corresponding phone model is available. Should i remove the respective row while iterating? I believe I cant change the datatable while it is being iterated through?

You need a new field where name and number are together.
Then join your two dt, see here:

image

Try “Filter datatable” Activities to remove the rows you need.

I think you should copy that datatable → name it dt_temp, and remove the row on dt_temp with conditions.