Filter Data Table - Currently only filtering last record

Hello,

I have two sets of data i have built into data tables (dtInvoice and dt1). I am attempting to filter dt1 using a string from dtInvoice(stSupplierTitle2). Currently though it is only matching the last string in stSupplierTitle2 onto the output sheet FAME Match.xlsx.

In addition, when trying to output each match in the filter i think my current setup just writes over the previous. What would be the best way to add it to the last set of results?

FAME Match.xlsx (8.6 KB)
Invoice Data.xlsx (995.0 KB)
UK Updated 3.xlsx (14.8 KB)
Update_Invoice_Data.xaml (23.7 KB)

Hey @jon1302

Yes because you are getting Datatable output which will override in next iteration.
so if you wanna get them and you only want to use Filter Datatable Activity then use one other datatable outside For each scope and use merge datatable or
you can use datatable select and add rows into your output datatable with each iteration.

Update_Invoice_Data.xaml (24.7 KB)

Regards,!!
Aksh

2 Likes

I have more to learn! Brilliant though, thank you :slight_smile:

@aksh1yadav A question. The select condition you used: dtUK.Select(“[Company Name Update] Like '%”+row(“SupplierTitle2”).ToString+“%'”). What does the % do? Is it similar to a wildcard?

Hey @jon1302

Yes it is a wildcard. same like in sql queries :slight_smile:

Regards…!!
Aksh

1 Like

@aksh1yadav How can this select be re written without the wild card? i.e. If i just want to get an exact match?

Hey @jon1302

just do like this :slight_smile:

dtUK.Select(“[Company Name Update] = '”+row(“SupplierTitle2”).ToString+“'”)

Regards…!!
Aksh

1 Like

Thank you :smiley:

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