Validate data in two rows in the same datatable

I have a a data that i am trying to parse and compare data in two separate rows, here is an example?

image

I am trying to check that there is “L” in column A and that the text in Column “B” is “No License”.
I tried to use an IF statememt in a for each row and I am only able to get the result that identify the column A data but not the column B data and I am not sure how to compare the data in both columns. I used row(“ColumnA name”).ToString.Equals(“L”)

Hi
we got two options to handle this
If we want the data of such match we can directly filter the datatable with those values in both column with a SELECT method
Like this
dt = dt.Select(“[Data Type] = ‘Last AND [Data Description] = ‘No License’ “).CopyToDatatable()

Where dt is a variable obtained from read range activity

Or

If we want to manipulate those value after a IF condition then the condition like this
Inside the for each row loop
row(“Data Type”).ToString.Contains(“L”) AND row(“Data Description”).ToString.Contains(“No License”)

If true it goes to THEN part or ELSE part

Cheers @Nic_Karta

1 Like