Check If I Have Value in each row a Datatable

Hi All,

I Have Data table which is Master Data table which supposed to have values which i want to have in other data table (Input Data Table). So i tried putting each row and check if a row value contains another value it is not working and also converted the master data table into a string value and have put a condition if the input row value has value containing the master data table string

For example : (row(44).ToString.Trim.ToUpper.Contains(StrMasterDetails.ToString.Trim.ToUpper)) and like
DtMasterData.Columns(0).ColumnName.ToString.Contains(tr) tr is my for each input row value

But it is only returning the value exactly matching with the row value from input value. But i need to match for each value with the one of the column in Master Data Table if it contains then need to add a row

1 Like

Hey @TeddyBear91

Could you please explain on what to compare?

Sorry I was not clear on that part, Either a row of datatable with row of other datatable / row of datatable with some string


Hi @TeddyBear91,

If you are having 2 datatable and you want to compare the data from one table and inserting the data into another table you should use for each row loop. I’ve attached the sample with dummy data.

Hope it will be helpful.
twitter.xaml (10.9 KB)