Custom Fields openlab cds

 I want to calculate the average of custome field named "Teneur" of different injections and I tryed this custom fields but it didn't work 

So can you help me to correct this custom field or any other ideas to do this kind of custom field for calcution altering injections?

Parents
  • Hello,

     

    You can try this syntax. If you really want the values for all peaks then remove the where clause with the compound_name. If you want to include unknown peaks then change it to AllPeaks. Also change the "Sample*" to your name filter.

     

    Marty Adams

     

    CurrentSequence.AllIdentifiedPeaks.Where(function (x) x.Compound_Name = "Peak A").Where(function(x) x.Injection.Sample.Sample_Name like "Sample*").Select(function(x) x.Peak_Area).Average
Reply
  • Hello,

     

    You can try this syntax. If you really want the values for all peaks then remove the where clause with the compound_name. If you want to include unknown peaks then change it to AllPeaks. Also change the "Sample*" to your name filter.

     

    Marty Adams

     

    CurrentSequence.AllIdentifiedPeaks.Where(function (x) x.Compound_Name = "Peak A").Where(function(x) x.Injection.Sample.Sample_Name like "Sample*").Select(function(x) x.Peak_Area).Average
Children
Was this helpful?