Queue change

Hi Team
Iam getting one error “Sequence contains No elements”
when in the Extracted datatable doesnot have Doctype= “Auth Requested”
If i have Doc type= "Auth Requested " it is working fine
But i dont want error … even if it is not there…

I have to log a message if that DOc type is there …

This is the solution i want

@Nikhil_Katta

Then after the where clause use a .Count>0 to first check if any data is present with your condition… then in the then side use the formula fully and on else side you dont have auth requested doctype

If condition should look like this

Dt.AsEnumerable.Where(yourfunction).Count>0

Hope this helps

Cheers

Hi @Nikhil_Katta ,

You could also check with the below method, this also makes sure that we don’t re-do the expression /computation of the initial Filteration part :