5 Replies Latest reply on May 3, 2016 1:55 AM by bshang

    Query the AF attribute quality field

    Charles Zhang

      Hello,

       

      Recently, I create an elment with a lot of attribute which need to use the TLDR. Ocassionally, I found the quality field show "bad" there. After the communication with technical support, the explaination is that the query has no matched data or return "null". The interesting thing is I could define the return value as the query has no matched record. Also, I need to get the attribute status like "bad" to manipulate the visible status on the presentation layer.

       

      I am the beginner of the AF SDK development, so, I want to get some suggestion on how to use this flag data of attribute to use in element analysis, or to use it as the switch of visible on display. If I use this flag, how to get the GUID for the attribute, because I need to know the flag for which attribute I manipulate.

       

      I appreciate your comments here. thanks!

       

      charles.

        • Re: Query the AF attribute quality field
          bshang

          You can query the status of an AFValue via AFValue.IsGood Property  or  AFValue.Status Property . The GUID of the attribute is accessed via AFObject.ID Property . Would these properties suffice for you to manipulate the presentation layer? What kind of application is this? Do you just need to query these statuses to decide which attributes to hide or are there other requirements?

            • Re: Query the AF attribute quality field
              Charles Zhang

              Hello, Barry,

               

              Thank you very much for your response!

               

              Currently, I am using the VBA in process book with ERD. I ask the similar question in a previous post you may reference. Re: Hide some ERD values in Process book display I am considering to move to the web based application  based on Web API in the future. Actually, we have many requirement which could based on the AF system.

               

              For the requirements, we setup a product quality monitoring platform in AF. The element has many attributes which use the TLDR querying from a third party recipe system. Some attribute will return a "null" or bad value. I consider to use query the attribute status and decide whether display the result for the user, it also have the analysis result in the future.  Please give us some advice on the application structure to build this application for end user.

               

              regards,

              charles.

                • Re: Query the AF attribute quality field
                  bshang

                  You may want to look into PI Coresight 2016 along with its custom extensibility features. In this way, you can use leverage much of the search and display building tools and management we already provide. PI Coresight 2016: New Vision, New Display Editor, New Look & Feel

                  We also provide custom symbol extensions that can be configured for multistate.

                   

                  I'd also look into if any of the VBA in Processbook can be removed. In that case, you can host the PB display in Coresight.

                   

                  Going the custom coding route with PI Web API would be most work IMO. You would query for current values from PI at a preset interval, filter the result set for bad values, and then manipulate the charting library.(HighCharts, d3, for example) to hide the relevant fields.

                  1 of 1 people found this helpful
                    • Re: Query the AF attribute quality field
                      Charles Zhang

                      Hello, barry,

                      Coresight 2016 is really a great platform to present the data in AF and PI system. This really give us more extensible imagination to contain the analysis data as well as the asset data.

                       

                      For the application structure, I have a few questions here,

                      1. The user data input interface: we always face the situation is that allowing the end user interact with our production system. What is the basic concept on the coresight by design? Just like the initial purpose of my post, I want to provide the interface to input /load data into PI or RDBMS system.

                      2. For the coresight, what is the proper development platform for this? As I understand, HTML5/JS has a lot of IDEs to support. You say PI Web API is the most work IMO... I have no idea about "IMO". sorry, I am the beginner to understand the development methodlogy of PI.

                      3. For the current analysis platform, we have some requirements (datalink reports)  which realized in datalink with manual work. As we want to move the reports to coresight or AF, I found there are many limits, especially for the function on "top n" list. Say I want to list the top n child elements in coresight/display/webpage  and their attribute as these childs meet a given situation. Normally, the roll-up analysis could do total/sum/count function. Any comments for this?

                       

                      Thanks for your time!

                       

                      charles.

                        • Re: Query the AF attribute quality field
                          bshang

                          Hi Charles,

                           

                          PI Coresight is great for creating and sharing real-time web-based displays with data from AF. This can be done without custom coding. Currently, there is no out-of-the-box feature for manual input, although it is on the roadmap. We'll soon be exposing an extensibility model that allows programmatic manipulation (via HTML5, JS, CSS) of displays and this might suit some of your use cases.

                           

                          Regarding your quote "provide the interface to input /load data into PI or RDBMS system", are you looking for a web-based system for transferring data (between PI/RDBMS), building reports/analyses from the browser, or for real-time dashboards/trending? Coresight can be used for the latter but so much the others.

                           

                          IMO means "in my opinion" .

                           

                          For dashboards, I would try out PI Coresight first and then move to PI Web API if the former doesn't meet the requirements. In my experience, the display building process is much more streamlined with PI Coresight as it was built specifically for this purpose.

                           

                          Regarding 3), I gather one use case is building reports with a web-front end? Is the user-interface in the web-based dashboard going to be similar to Datalink's? For ad-hoc analytics, another non-programmatic option is via the PI Integrator for BA. PI Integrator for BA

                           

                          With the Integrator, you can export PI data to CSV or SQL and use reporting/visualization tools like Spotfire, PowerBI, and Tableau for ad-hoc analyses.

                           

                          Regarding top N elements, there's no function out-of-the-box currently to support this. If there are not that many elements to sort (<1000) and the query load is light (order of min rather than sec), then custom code can be used to sort the list client-side.