4 Replies Latest reply on Oct 14, 2016 9:51 AM by pthivierge

    PI Coresight URL building for all the attributes of an element/through AF tables!

    Navaneethakrishnan

      Hi All,

       

      I am using PI Coresight 2015. I have done some workout on Coresight Adhoc display URL building (dynamic). My queries are,

       

      1. Are we able to plot all the attributes of an element without mentioning the attributes. for example, "localhost/coresight//#/Displays/AdHoc?DataItems=\\AFServer\AFDB\Path" instead of "localhost/coresight//#/Displays/AdHoc?DataItems=\\AFServer\AFDB\Path|Attribute1;\\AFServer\AFDB\Path|Attribute2" (because of URL characters limitations, unable to achieve the requirement; suppose I have more than 10 attributes to plot)

       

      2. Can we get the list of attributes to be plotted into AdHoc displays by getting those attributes through AF table with some conditions? for example, I have AF table with Asset, AttributePath fields and sample values are below,

      Asset                    AttributePath

      Compressor1      \\AFServer\AFDB\Path|Attribute1

      Compressor1      \\AFServer\AFDB\Path|Attribute2

      Compressor2      \\AFServer\AFDB\Path|Attribute1

      Compressor2      \\AFServer\AFDB\Path|Attribute2

      Compressor2      \\AFServer\AFDB\Path|Attribute3

       

      If I am selecting Compressor1 the URL should automatically populate the Adhoc display with 2 attributes where as for Compressor2 with 3 attributes.

       

      Please let me know, if any possibilities for the above points to achieve the result.

       

      Thanks in advance!

       

      Regards,

      Navaneethakrishnan V

        • Re: PI Coresight URL building for all the attributes of an element/through AF tables!
          Roger Palmen

          On 1) wildcards are not supported, but you could create an Element-Relative display that shows the max # of trends, and use the URL encoding to set the Element.

          On 2) if you have AF 2.8, you can use the URL builder to create an URL. You could achieve the same with the string builder DR. But you need to be creative in stringing together the individual items. Adding an index 1-10 to the table, resolving items 1-10 in 10 attributes, and stringing those together in another attribute.

          • Re: PI Coresight URL building for all the attributes of an element/through AF tables!
            pthivierge

            Hello Navaneethakrishnan,

             

            If you provide a high level overview of what you are trying to achieve that would help us to potentially give you a better answer. 

            Looking from too close we can't see the big picture

            --

            General questions

            Is this application a web application that embeds Coresight ADHOC displays?

            Can you use javascripts?

            Can you use PI Web API?

             

            Here are few questions I have when I look at your questions:

            Q1

            • Browsers have a non-clearly defined limit of 2000 characters to build urls (see good explanation here), are you reaching this limit because your AF path are too long?
            • In our documentation, PI Coresight 2015 Installation and Administration guide, it says that you can use an element, in this case all attributes should appear in your table or trend.

            Q2

            • if you can provide some background and high level details to what you want to achieve that would be best.
            1 of 1 people found this helpful
              • Re: PI Coresight URL building for all the attributes of an element/through AF tables!
                Navaneethakrishnan

                Hi Patrice,

                 

                Sorry for the delay response and thanks for your valuable time on my query.

                 

                Actually we are doing integration between a common web portal which holds PI event frames data (like starttime, endtime, element). Actual goal is to achieve while clicking details button of an event through that portal, Coresight trend has to appear in a new tab with the appropriate attributes which contributes the event.

                 

                What we achieved was creating tables with AF path and respective parameters to be displayed. In a realtime world, we can't change every time the third party tables. So, to make the solution even better (dynamic) need to have those attributes inside PI AF table itself. Problem here is, how to fetch the dynamic URL while a button click in a third party web portal.

                 

                As of now, we are not using AF SDK/Web API/Web Services in this integration.

                 

                Please let me know, if any further clarification/queries!

                  • Re: PI Coresight URL building for all the attributes of an element/through AF tables!
                    pthivierge

                    Thanks a lot for the explanations Navaneethakrishnan, I understand better now!

                     

                    If your web portal is making use of JavaScript, you should maybe consider using PI Web API that should be more flexible for you to get AF Data.

                    For example you get access directly to Event Frame's attributes with the GetAttributes Action available in the EventFrame Controller.

                     

                    What technologies your portal is using? is it pure html/javascript? Something based on share point and web parts? Server side code like ASP.NET MVC?

                    Does it have any possibility to integrate code or javascript calls?

                    That will help understand a little further, I know this is a lot of questions but hopefully we can come up with a solution