Help: Count of Transaction State from IEnumberable<QueueItem>

Hi! I’m trying to get the count of a transaction state from the IEnumberable using LINQ but I am not getting the correct output.

Here are the codes that I tried but they always return 0 value :slightly_frowning_face:

ienum_QueueItemsCaptured.Where(Function(x) x.Status.Equals(“Successful”)).Count
ienum_QueueItemsCaptured.Where(Function(x) x.Status = “Successful”).Count

And this output is what Im trying to achieve (got this from a snip in Queue Item Status Codes Mapped with Status Text but no luck getting the solution)

image

@tep_b

item.Where(Function(x) x.Status.ToString.Equals(“Successful”)).Count
Here your quotation in a successful string caused the issue. Check the quotation

Man, you’re a hero! Didn’t realize that the output of that property is not a string. I really appreciate the help!

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