6 Replies Latest reply on Mar 2, 2017 2:00 PM by helgesonc

    AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria

    helgesonc

      Hello,

      I am working with AFSDK (2.8.2) and need to create a PI Tag Search dialog.  It looks like the "OSIsoft.AF.UI.AFOperations.FindPIPoints(...)" functions fill the role of what used to be "PISDKDlg.TagSearch" in PISDK.  I am having an issue customizing the initial search parameters, however:  it looks like the PIPointCriteria I configure is completely ignored unless the NameFilter property is not empty.  Is there a workaround for this?  I am trying to default the search to use ExactMatch for the tagname but I don't want to specify what that name is.  A pseudo-workaround seems to be to just set it to "Name:", but I think that will confuse the end user.  Any suggestions?

       

      Dim PIPointList As List(Of PI.PIPoint) = Nothing

      Dim criteria As New OSIsoft.AF.UI.PIPointCriteria

      criteria.ApplyTextOptionToNameFilter = True

      criteria.IncludeDescription = False

      criteria.TextSearchOption = UI.AFUITextSearchOption.ExactMatch

      'criteria.NameFilter = String.Empty ' the options above are completely ignored unless the NameFilter property is not empty

      criteria.NameFilter = "Name:"

      PIPointList = OSIsoft.AF.UI.AFOperations.FindPIPoints(Me, String.Empty, False, False, False, criteria, String.Empty, String.Empty, False, False)

       

      Thanks,

      Caleb

        • Re: AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria
          Rick Davin

          Perhaps "Name:*" would not be as confusing.

          1 of 1 people found this helpful
            • Re: AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria
              helgesonc

              Rick,

              Thanks for the reply.  Is that the only solution?  In a future AFSDK release, could it be possible to assign specified criteria to the FindPIPointsDialog without actually specifying the NameFilter property?

              Thanks,

              Caleb

                • Re: AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria
                  Rick Davin

                  Hi Caleb,

                   

                  Is this the only solution in the long term?  No.  Is it the only solution you have available today?  Most likely, yes.

                   

                  I've been in your shoes.  I've been an OSIsoft employee for less than a year.  Prior to that I was a customer for 14 years.  If I came across issues similar to yours while I was a customer, I was in desperate need of a solution or workaround TODAY.  For the long term, it would be nice that they put in a work order for it.  I generally allotted 6 - 12 months for that long term fix to appear in a future version of AF because even as customer I knew they had to enter a WI, assign a priority, and find time to work on it alongside all the other work items (some much older with higher priority), plus do that while building new features.

                   

                  Between the working solution available today and the perfect solution available next year, I always opted for the working solution.  And when the long term fix came out, I probably had a 20% chance of going back to old applications to update them, and only then because there was another pressing issue that caused me to modify the app in the first place. 

                   

                  With that said, I have passed your request onto our development team.

                   

                  On another note, I cannot urge you strongly enough to upgrade your AF Client to AF 2.8.6 also known as PI AF Client 2016 R2 SP1.  You are currently on AF 2.8.2, which is subject to a DST bug.  Please see AL00311 - Daylight Saving Time (DST) bug introduced in AF SDK 2016 (2.8).

                   

                  Regards,

                  Rick

                  • Re: AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria
                    gregor

                    Hi Caleb,

                     

                    When reading your initial post, my understanding is that you are creating your own Tag Search Dialog instead of using a control from AF UI SDK. Is there a specific reason you are using PIPointCriteria which is defined in AF UI SDK? Would it be an option for you to use one of the PIPoint.FindPIPoints method overloads from AF SDK?

                      • Re: AFSDK's FindPIPoints Dialog Ignoring Specified PIPointCriteria
                        Rick Davin

                        Hi Gregor,

                         

                        I think Caleb meant that he needed a dialog, and rather than create one himself he did use AFOperations.FindPIPoints, which is a part of AF UI SDK (although its help is not a part of LiveLibrary).  The difference between AFOperations.FindPIPoints and PIPoint.FindPIPoints is that the former is a UI dialog where the end-user may interact and alter the search as needed, whereas the latter would be fixed criteria in code unseen by the end-user.  And if I am not mistaken, AFOperations.FindPIPoints limits the returned items from a search to 100K points.