AnsweredAssumed Answered

Inconsistent behavior of FindPIPoints

Question asked by dpilc on Aug 22, 2016
Latest reply on Aug 24, 2016 by bpayne

When querying PI via AF SDK, I've run into a problem which, I think, is a bug. FindPiPoints method behavior is not consistent:

  • when called with two identical PIPointQuery conditions tag name like '*' it returns a list of PIPoints with duplicates - each point is repeated
  • when called with two identical PIPointQuery conditions tag name like 'AAA*' it returns a list of distinct PIPoints (no duplicates, assuming there are some tags with names beginning with AAA)

The only difference is that there are non-wildcard characters in the second query.

 

Try the following snippet:

PIPointQuery[][] qList = {new PIPointQuery[] { new PIPointQuery("tag", OSIsoft.AF.Search.AFSearchOperator.Equal, "*") },

                          new PIPointQuery[] { new PIPointQuery("tag", OSIsoft.AF.Search.AFSearchOperator.Equal, "*")} };

 

IEnumerable<IEnumerable<PIPointQuery>> conditions = qList.ToList();

PIPoint.FindPIPoints(myPIServer, conditions.ToList());

 

This happens on PI Server 2016 and PI AF SDK 2015 R2.

Outcomes