I recently wrote up a short introduction to using the URI builder Data Reference to create links to google maps. Here, I wanted to do the same to build a PI Coresight Ad Hoc display.
Ad Hoc displays are limited to display trends, so this particular example might not have a wide appeal, but I believe the techniques shown below should be more widely known.
In this example, we will show how to display the URL to open the following PI Coresight page.
We typically recommend to store the name of a PI Data Archive in a top level element and I did the same to store the name of the PI Coresight server information.
Let's now look at how I configured the URI Builder part by part.
First, the address uses the value of the address as: https://'\PI Coresight|Name'/Coresight/. The '\PI Coresight|Name' reference is what allows me to get the value of the PI Coresight server name.
I can see that this are working out well so far by looking at the preview view to the left of the ok button.
The Display field now simply the fixed parameter "/Display/AdHoc".
To build an Ad Hoc display, we need to get the path of the attribute we want to display in the Ad-Hoc display.
We can do this using a string builder reference. What we need is to build a string that contains the name of the AF server, the database, the path of all elements and finally the name of the attribute. In this case "temperature".
The string builder configuration is thus: \\;"%System%";\;"%Database%";\;%ElementPath%;|;Temperature;
We use this string builder data reference attribute in the URI builder as the following key/value pair.
The ".|" in ".|path" simply refers to accessing a child attribute of the URI builder attribute.
This makes a complete example, but to flesh things out more, we can add other parameters. Thus, I add in EndTime and StartTime as child attributes of my URI builder. (I also set them these child attributes as invisible as they do not need to typically seen).
I can then add them along side with other url parameters. Parameters such as kiosk mode and hidetoolbar.
This gives me a quick way to see this information on PI Coresight.