Compare cell Values

Hi,

I have a query in DataTable in one datatable Title as same for the 2 Records at that time i need to delete effective status row and keep only pending effective row in the table. kindly advise for the same. Excel screenshot as below.

Input :
image

Output:

image

Thanks in advance.

Example excel
image

  1. use read range to read excel

  2. use filter data table to keep only status= “Pending Effective” rows

  3. use write range to write the new table

Result
image

Hi @Shriharsha_H_N
In addition to what @jack.chan said

u can use linq query for this too

dt1 = dt1.AsEnumerable().Where(Function(row) row(“Status”).ToString.Equals(“Effective”)).CopyToDataTable

Regards,

Nived N

Happy Automation

Hello @Nived i found this error

Hi @Shriharsha_H_N

Use that in assign activitiy as it return a datatable with filtered values

You can use below query in condition, @Shriharsha_H_N
dt1 = dt1.AsEnumerable().Where(Function(row) row(“Status”).ToString.Equals(“Effective”)).Count > 0.

2 Likes

Hi @Shriharsha_H_N

Please find the attached xaml file for your reference. Hope this is what you are expecting.

Testing.xaml (15.5 KB)

Feel free to reach us at any time if you have doubts. Thanks.

Happy Automation.

Hello @vignesh.ks

Packages issue kindly suggest the package

image

I didn’t used any third-party or additional packages. Below is the screen shot and I attached the zip file for your reference.

FilterDataTable.zip (55.1 KB)

Thanks