3 Replies Latest reply on Feb 21, 2013 3:05 PM by cmanhard

    AF - RDA and Filter Summaries

    wpurrer

       

       

      Dear Vcampus,

      "Filter Tag" is a attribute on the same level as the "main attribute"

       

       
       

       

       
      summary = attribute.Data.FilteredSummaries(timeRange, interval, 

      ".FilterTag > 0"AFSummaryTypes.Average, calculationBasis, AFSampleType.ExpressionRecordedValues, AFTimeSpan.Zero, AFTimestampCalculation.Auto);

       

       

       
      We get the following error:
       
      Exception:Thrown: "[-12301] Performance Equation parsing error" (OSIsoft.PI.Net.PIException) A OSIsoft.PI.Net.PIException was thrown: "[-12301] Performance Equation parsing error"
       only information in the documentation is:
      Type: System..::..String A string containing a filter expression. Expression variables are relative to the attribute. Use '.' to reference the containing attribute. 

       

       
        • Re: AF - RDA and Filter Summaries

          Hello Wolfgang,

           

          The filterExpression is PE syntax. Please try something that should obviously work as a filter even it doesn't make too much sense for your query i.e. "'SINUSOID' > 0". If this works you can try if using the single quotes also works in your case "'.FilterTag' > 0". If this doesn't work please try using the full attribute path.  

            • Re: AF - RDA and Filter Summaries
              wpurrer

              Hello Gregor

               

              Thanks for your fast Response, Unfortunately none of the suggested solutions worked.

               

              Test 1:

               

              summary = attribute.Data.FilteredSummaries(timeRange, interval, "'SINUSOID' > 0", AFSummaryTypes.Average, calculationBasis, AFSampleType.ExpressionRecordedValues, AFTimeSpan.Zero, AFTimestampCalculation.Auto);

               

               

               

              Exception:Thrown: "Unrecognized variable 'SINUSOID' in expression." (System.InvalidOperationException)

               

              A System.InvalidOperationException was thrown: "Unrecognized variable 'SINUSOID' in expression."

               

               

               

               Test2:

               

              summary = attribute.Data.FilteredSummaries(timeRange, interval, "'.FilterTag' > 0", AFSummaryTypes.Average, calculationBasis, AFSampleType.ExpressionRecordedValues, AFTimeSpan.Zero, AFTimestampCalculation.Auto);

               

               

               

              Exception:Thrown: "Unrecognized variable '.FilterTag' in expression." (System.InvalidOperationException)

               

              A System.InvalidOperationException was thrown: "Unrecognized variable '.FilterTag' in expression."

               

              Regards

               

              Wolfgang

                • Re: AF - RDA and Filter Summaries
                  cmanhard

                  The variable names used in the syntax are relative to the attributes collection of the current attribute.  Examples

                   

                  Attribute at same level: 'FilterTag'  (do not use '.')

                   

                  PI Point in same server: '\\myServer\sinusoid'   ('sinusoid' alone would cause AF SDK to look at sibling attributes)

                   

                  self or same attribute as being called from: '.'  

                   

                  child attribute '.|childAtrribute'