Help with filters

GUYS help please…here i want to filter for only one column ‘Product Code’ and remove Campaign Code
How do i structure this line of code

what exactly is not working. Mabye you elaborate more on this along with sample data

The LINQ Where operator is not for removing columns.

So I need to have an if statement where one uses to filter for both these columns on excel and the other needs to filter for only one which is ‘product code’.
So how do I use that function to filter for one column

Hi @Anelisa_Bolosha ,
Can you share your data input and expectation output
Regards
LNV

Im using that enumerable.Where function

These are the two columns im using, so I need to filter for only product code columnn

lets link it with:

The lambda (evaluation expression) has to return a boolean indicating if the filter evaluation is met or not

please name for us the resulting datatype of filteredList
Can you also show us where to find / how to set this specific datatype within the variable panel

Thanks

Hi,
I understand here you have a list of products, a list of product codes, but you need to filter to get certain codes, for example “8200”.
you can use filter data table


you can try
Regards,
LNV


Everything is already working here like this but i just wanted a way to filter for one column if possible with that same function

dt.AsEnumerable()Where(Function(row) row.Field(Of String)(“productcode”)=desiredProductCode).ToArray()
try this…

1 Like

DT_MIP.AsEnumerable.Where(Function(x) x(“Product Code”) = ProductCode).ToArray()

1 Like

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