ON THIS PAGE:
Overview
The hyperlink component can be used to open an Explorer page or trend, or to open an external URL.
For a full description of the hyperlink properties, refer to the comprehensive reference at the end of this article.
Quick Start
This section explains how to set up a hyperlink in four steps.
Content: The Hyperlink on your Page
The hyperlink is similar to a text label in appearance.
1. Type in a meaningful Content, including optional variables; this is what the user will see on your page.
Type: What to Link to
You can link to any of the following:
- Open Page, to open an existing Explorer Page
- Open Trend, to open an existing Explorer Trend
- New Trend, to open a new Explorer Trend
- Open URL, to open an external URL
2. Select a Type from the drop-down list, then fill in its applicable details (Workspace Name/ Page Name/ Trend Name/ URL).
Tab Type: Where to Open
3. For Explorer displays (trends and pages) the options are: New Explorer Tab and Same Explorer Tab. For URLs, the options are New Explorer Tab, Same Explorer Tab and New Browser Tab.
Note, for URLs: Unless the address begins with https the URL opens in a new tab in your web browser, regardless of the selected Tab Type.
Variable Mapping: Sending Parameters from the Source Page
Use Variable Mapping to send values to the destination page, trend or URL.
4. Click Add, then select a Source and type in a Target value for the Variable Mapping. This must be an accurate, case-sensitive match.
The Source is a variable from your page. The Target must match the variable name on the destination page, trend or URL. For pages and trends, this overrides Default Values.
Tutorials
If you're unfamiliar with the process of building pages, read the article Building an Explorer Page.
There are four different types of hyperlink in Explorer, each covered in a separate tutorial.
- Tutorial 1: Adding a Hyperlink to Open a Trend
- Tutorial 2: Adding a Hyperlink to Open a New Trend
- Tutorial 3: Adding a Hyperlink to Open an Explorer Page
- Tutorial 4: Adding a Hyperlink to Open a URL
Tutorial 1: Adding a Hyperlink to Open a Trend
In this tutorial, we're going to create a hyperlink to an existing trend, using two page defaults, pageSampleMethod and pageSampleInterval, as variables in Variable Mapping.
Before you start this exercise, make sure you have a trend to open.
- If you have access to the training environment, you should be able to use Silver Trend, in the Tutorials workspace. You can search for the trend, to make sure you have it.
- Otherwise, add a new trend, and save it.
Or, just skip to Tutorial 2, where you get to open a new, blank trend.
Step 1. Add and Configure a Hyperlink
1. Drag a hyperlink component onto a grid cell. The Hyperlink is in the Display group.
2. Now configure the hyperlink:
Note: This step includes adding Variable Mapping. We'll be using two page defaults: pageSampleMethod and pageSampleInterval. Read more about Page Default Values here.
|
A note on Variable Mapping for Trends: Trends use specific default values, as outlined in the URL Formats section of how to Link to a Trend via a URL. For example, Trends have a parameter called sampleInterval, which uses seconds to control the sample interval in which trend data is collected.
This is how your grid cell should be looking now:
Step 2. Test your Hyperlink
Now that your hyperlink is set up, click the Preview button on the Studio toolbar to see what your page will look like in run-time.
Click the hyperlink.
The Silver trend opens. Note how the two Variable Mapping values have set the values for Sample Method and Sample Interval on the trend.
Don't forget to save your page!
Tutorial 2: Adding a Hyperlink to Open a New Trend
In this tutorial, we're going to create a hyperlink to a new trend, using the page default pageSampleInterval as a variable in Variable Mapping.
Step 1. Add and Configure a Hyperlink
1. Drag a hyperlink component onto a grid cell.
2. Now configure the hyperlink:
Note: This step includes adding Variable Mapping. We'll be using a page default: pageSampleInterval. Read more about Page Default Values here.
|
A note on Variable Mapping for Trends: Trends use specific default values, as outlined in the URL Formats section of how to Link to a Trend via a URL. For example, Trends have a parameter called sampleInterval, which uses seconds to control the sample interval in which trend data is collected.
This is how your grid cells should be looking now:
Step 2. Test your Hyperlink
Now that your hyperlink is set up, click the Preview button on the Studio toolbar to see what your page will look like in run-time.
Click the hyperlink.
A blank trend opens. Note how the Variable Mapping value has set the value for Sample Interval on the trend.
Don't forget to save your page!
Tutorial 3: Adding a Hyperlink to Open an Explorer Page
In this tutorial, we're going to create a hyperlink to another Explorer Page.
Before you start this exercise, make sure you have a page to open.
If you have access to the training environment, you should be able to use the Selected Chart Axis page, in the Tutorials workspace.
Step 1. Add and Configure a Hyperlink
1. Drag a hyperlink component onto a grid cell.
2. Now configure the hyperlink:
|
This is how your grid cells should be looking now:
Step 2. Test your Hyperlink
Now that your hyperlink is set up, click the Preview button on the Studio toolbar to see what your page will look like in run-time.
Click the hyperlink.
The Chart Page opens. Note how the Variable Mapping value (2014) has set the value for the selectedAxis variable.
Tutorial 4: Adding a Hyperlink to Open a URL
In this tutorial, we're going to create a hyperlink to an external URL.
This tutorial does not use variable mapping; if you are going to use variable mapping with an external URL, ensure that you know which parameters are available. Then reference, by name, the ones you use in the Target of the Variable Mappings.
Step 1. Add and Configure a Hyperlink
1. Drag a hyperlink component onto a grid cell.
2. Now configure the hyperlink:
|
This is how your grid cells should be looking now:
Step 2. Test your Hyperlink
Now that your hyperlink is set up, click the Preview button on the Studio toolbar to see what your page will look like in run-time.
Click the hyperlink.
The Australia Weather opens in a new tab within P2 Explorer. Note how this page is named Australia Weather, using the Header property.
Comprehensive Reference
This section describes the properties of the Hyperlink component.
|
|
Release History
- Hyperlink 4.4.4 (this release):
- The default value for Type has changed from 'Open Page' to 'Select Type'.
- For the ‘Open Trend’ type, the drop-down lists for workspaces is filtered to those that contain trends.
- For the ‘Open Page’ type, the drop-down lists for workspaces is filtered to those that contain pages.
- Hyperlink 4.4.0
- Updated the help to reflect changes in the Explorer framework.
- Hyperlink 4.3.2