How to filter the datatable base on one column with two conditions?

Hi, team!
I want to filter the datatable base on one column with two condition.

I mean I want thoes records which has column Order Status , column values is “comfirmed” and “Delivery Pending”.

Thanks in Advance!!!

Use the Filter Data Table activity. The filter would be “Order Status” equals “confirmed” or “Order Status” equals “Delivery Pending”

Do I need to edit in Ouput column?

Hi @Sanket_Shinde1

Try the below linq query:

dtFiltered = dt.AsEnumerable().Where(Function(row) row("Order Status").ToString().Equals("Confirmed") Or row("Order Status").ToString().Equals("Delivery Pending")).CopyToDataTable()

Regards

Thank you so much Varunraj and Poul

1 Like

You’re welcome @Sanket_Shinde1

Happy Automation
Regards

If you don’t want to remove any columns, then you don’t have to do anything on that tab. It’ll default to just keeping all the columns.

1 Like

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