More scopes in one CC formula

Hello guys,

I have one question about using CC. So far i did not figured out how to use more schopes in one CC formula to kinda filter things.

Lets look at example:

Formula for counting number of SS injections

(I made this formula to determinate number of injection in sequence to help me with checking right sequence execution. Or in how many injections we have some peak)

So I got number of injections by injections scope, but when I want to add kinda another conditon to look for some peak I do not know how to define another scope condition and use both together.

Have somebody idea how to do it, because I am noob at LINQ?

Thank you

  • Hello,

    In the example below, I want to find all the calibration injections that have Peak A. Both of the CCs below would work for this result. I have 15 cal standards in the result set with one injection missing Peak A so I get 14 as the count. 

    Marty

    CurrentSequence.AllInjections.Where(function (x) x.Sample.Sample_Type = 1).OrderBy(function(x) x.CreationTime).SelectMany(function(x) x.AllIdentifiedPeaks).Where(function (x) x.Compound_Name = "Peak A").Count

    CurrentSequence.AllIdentifiedPeaks.Where(function (x) x.Injection.Sample.Sample_Type = 1).Where(function (x) x.Compound_Name = "Peak A").Count

Was this helpful?