Comparing two data tables for vendor TaxID

@KarthikByggari @nadim.warsi

I have to scrape the vendor data and should search the information for each vendor Id by camparing them and if they are equal it should enter the loop. I have stuck in writing the condition for comparing the two data tables. Can any one help me to sort out the problem.

Thanks in advance.

Consider two data tables - DT1 and DT2
DT1 and DT2 both contains column name “VendorID” (data type - string)

For Each item in DT1

-----Body of Loop------
Assign Activity, variableVendorID = item(0).ToString [considering the first column is VendorID in DT1)

Assign Activity, foundRows = DT2.Select(“VendorID=” + “’” + variableVendorID + “’”)

If foundRows.Count > 0 Then
VendorID is found in DT2
VendorID is not found in DT2
End If

Karthik Byggari

1 Like

Hi @KarthikByggari Can you just tell me how that assign work?!

We are taking vendor id from data table1 and looking for the same id in the data table 2.
So in the Assign activity, if id is found in the data table2, then foundrows count is greater than zero else the count is zero (if id is not found).

I’m getting this error when I debug the workflow.

Can you send me the expression written in the Assign activity.

Can you replace column name Tax ID with [Tax ID] and check.

I’m getting this error if I use like [Tax ID


In the assign activity, ExtractDataTable.Select("[Tax ID]=" + “’” + variable_Tax_ID + “’”)

Can you please tell me how to sort out this type of error

in_VendorData is a data row, not the array or data table.
For each works for arrays, data tables, lists and other collection types.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.