MassimoDossola

PIPointList.FilteredSummaries: Filter syntax

Discussion created by MassimoDossola on Nov 5, 2019
Latest reply on Nov 6, 2019 by MassimoDossola

Hello,

 

I need to call the method FilteredSummaries from a PIPointList but I'm not sure how to format the filter query.

Here below my example:

 

string filter = "'sinusoid' <> 'OSIsoft.AF.PI.PIException'";

 

 var pointResults = piPointList.FilteredSummaries(dateRange, summaryDuration, filter, AFSummaryTypes.Count, AFCalculationBasis.EventWeightedIncludeBothEnds, AFSampleType.ExpressionRecordedValues, AFTimeSpan.Zero, AFTimestampCalculation.Auto, PagingConfig);

 

What I need to do is extracting the tag event counts, for values not equal to "OSIsoft.AF.PI.PIException". The filter I tried (that works on PI Data Link in Excel) is "'sinusoid' <> 'OSIsoft.AF.PI.PIException'", but it returns an error regarding the query syntax. Unfortunately I didn't find any example in the online documentation that can help me.

 

Any suggestion would be greatly appreciated!

 

Thank you

Massimo

Outcomes