Need linq query for multiple filter

ok, that’s done, it’s working fine now.

pls check the below error

Also pls let me know if person is not already there in most of the reports then it will work right? Also for some case below item is not available in column, so, irrespective of any information bot should work. is that possible right with UiPath.
image

@RAKESH_KUMAR_Tiwari ,
I believe there is a correction to be done in ths Query as there is a Function() and {,} missing.

Would recommend you to keep the values in a array or list variables, so that it will be easy debugging in the later stages and easy addition of values to it if required.

Were you not able to implement the previous suggestion ?

Also, For Handling errors related to direct CopyToDatatable, you can check the below post :

@RAKESH_KUMAR_Tiwari

Please change this (“valux”,“valuey”) to {“valux”,“valuey”}

cheers

Hi @supermanPunch ,

image
can you pls check, why these enteris also coming after filtering.

@Anil_G, The anonymous function is missing as already mentioned.

The Updated Expression should be the below :

filter_dt.AsEnumerable.Where(Function(x) {"Approval and Coding","Comment Request","Receiving Resolution","170 verification procees for PO Invoice"}.Any(Function(y)y.Equals(x("Queue").ToString)) andAlso Not {"Agata Panek(APKNEK)","Alex Lee(ALLE7)", "Alexander Fenn(AFENN)", "Ali Hayder Tokay(ATOKAY)", "Alia Salameh (ASALAME1)", "Alessandera Luceri (ALUCERI)"}.Any(Function(y)y.Equals(x("Responsible User").ToString))).CopyToDatatable
1 Like

@RAKESH_KUMAR_Tiwari

Please do use the above expression mentioned by @supermanPunch

i have remoced the updated comment as well as there are more syntax errors in it

Cheers

Hi @supermanPunch ,

can you pls check , why it is filtering which is not requiored also? img for refernce

image

i need to filter below one that’s it.
Approval and coding
Comment request
Receiving Resolution
170 verification procees for PO Invoice

one more thing i observed , i filtered the data and write the data in different sheet than it is working fine, but when i try to write the data in same sheet where i filtered it, it is not filtering properly, you can refer the above img.

@RAKESH_KUMAR_Tiwari

When you are writing to same sheet…it would work as expecyed but you need to first clear the sheet so that only nee data is present or else old data where rows are not being written again will be retained

Please chekc the same…you can clear or delete old sheet and recreate the same again

And if youw ant the file to be checked…please provide a sample input and output files so that we can recreate and check

Cheers

shared, personnely to you

just one question, no need to put for each loop right?

i reading the data storing in dt, using assign and filtering the data and writing the same in write range

@RAKESH_KUMAR_Tiwari

No Need to use for loop

And if on excel then I tried like below and it is filtering properly

RakeshFilter.xaml (9.2 KB)

cheers