Links and the Table of Contents

This article applies to P2 Server versions 4.4.5 and later. For more, see Release History.

This article describes how to create links (previously called renderers) in P2 Server Management and group them for display in the P2 Explorer ribbon. For information on how to assign links to a template, see: Creating Templates and Attributes.

In P2 Server, links can be assigned to templates. When a template with assigned links is designated as the primary template for an entity, those assigned links will appear in the entity's Table of Contents in P2 Explorer. Here is an example of a Table of Contents for entity Bossier 1-1:

toc

Links can be organised into groups for display in the Table of Contents, or may remain ungrouped. The default link on a template will appear as the first link in the Table of Contents, and will be larger than the other links.

toc-annot


What can you link to?

You can create links to external websites and applications, and Explorer pages and trends. You can also pass state to Explorer pages and trends, by using variable parameters in the URLs.

Related: Linking to an Explorer Page, Linking to an Explorer Trend

Another important capability is that you can also use expressions inside links to drive custom URLs. This provides the ability to open custom reports in an external system with data from P2 Server. These systems include document management systems, maintenance systems, reporting systems, or even custom third party systems, as long as they accept the parameters.

Here are some examples:

Simple well report

The following example opens an external website in a new browser window, and passes through the name of the entity selected in P2 Explorer (or another application that can consume these links):

https://myExternalSite/openWellReport?Well=EXPR(ENTITY)

Well report with dates

This example opens an external website in a new browser window, and passes through the name of the selected entity, as well as the start and end of the current production day (calculated at the time the link is clicked):

https://myExternalSite/openWellReport?Well=EXPR(ENTITY)&StartTime=EXPR(ProductionDayStart(Time()-86400))
&EndTime=EXPR(ProductionDayStart(Time()))

Well report with live tag data

This example opens an external website in a new browser window, and passes through the name of the selected entity, as well as the value of a historian tag (Silver), at the time the link is clicked:

https://myExternalSite/openWellReport?well=EXPR(ENTITY)&CurrentValue=EXPR({Silver,sampleMethod='Raw'})

 


Server Management

There are 2 main parts to creating a Table of Contents:

  1. Creating the link groups.
  2. Creating the links.

The only prerequisite is that the thing you are linking to must already exist.

Once the links are created, they can be assigned to a template - this step will also define the default link for entities that have the template designated as primary.

Creating a Link Group

To create a link group in P2 Server Management:

1. Open P2 Server Management, and click the Configuration configurationicon icon.

2. Click Link Groups.

3. Click Create New Link Group.

Note: If you want to edit an existing group, select it from the list below the Create button.

4. Give the link group a name and a description. Note that the name must be unique and cannot contain any reserved characters. For the description, it's often useful to provide a broader explanation of the purpose of the link group and how it will be used.

Related: Reserved Characters & Keywords

5. When you have finished, click the Save button in the top right corner.

Creating a Link

To create a link in P2 Server Management:

1. In P2 Server Management, and click the Configuration configurationicon icon.

2. Click Links.

3. Click Create New Link.

Note: If you want to edit an existing link, select it from the list below the Create button.

4. Fill out the following information:

  • Give the link a name and a description. As link names do not have to be unique, it's often useful to provide a description of where the link comes from.
  • Select the Link Group. This must already exist in the system.
  • Target:
    • Specify Application for Pages and Trends.
    • Specify Browser if you are linking to a URI.
  • Value:
    • For Pages and Trends, specify the GUID.
      To get the GUID, go to P2 Explorer and click Share Link on the page or trend. The GUID refers to the long number after the guid/ portion of the address:
      guid
    • For the Value, type the URI that you are linking to.
      • Here are some examples of web addresses that should work:
        • p2energysolutions.com
        • www.p2energysolutions.com
        • https://p2energysolutions.com
        • https://e4helpcenter.petroleumplace.com/help
      • Here are some examples of pages and trend with parameters:
        • https://[ServerName]/P2.Explorer/trends/guid/[guid]/?sampleInterval=3600
        • https://perauthor01.petroleumplace.com/P2.Explorer/Trends/Guid/41bed2a6-b21d-4d0e-a32c-8ecae6940d2b/?sampleInterval=3600
        • https://[ServerName]/P2.Explorer/pages/guid/[guid]/?selectedOption=No Truck
        • https://perauthor01.petroleumplace.com/P2.Explorer/Pages/Guid/b61e7b5e-34d0-4df3-a1ec-d582254e7647/?selectedOption=No%20Truck

Read more: Linking to a page, Linking to a Trend

5. When you have finished, click the Save button in the top right corner.

Done! Now that you have created links and link groups, you can assign them to a template and also define the default link for entities that have the template designated as primary.

 


Import/Export Spreadsheet

The Import/Export spreadsheet is generally only used to make bulk changes. 

For details on the spreadsheet and how to obtain it, see Exporting Your Configuration.

If you want to create links and link groups as part of a bulk configuration, you need to use the following tabs in the Import/Export spreadsheet:

  • Link Group
  • Link

Look for the red comment commentred icon in the row headers, to get help with each column.

DO NOT fill in or change anything in the Global Id field - this is the unique identifier for the link that allows it to be tracked across systems, and when it is renamed. It is automatically generated by the system.

Link Group Tab

The screenshot below shows an example of configured link groups. The fields are the same as the ones in the Creating a Link Group step in Server Management, using the above instructions on this page.

  

Dependencies

The Link Group tab has no dependencies on information from other tabs. However, the Template Definition tab has a direct dependency on the Link Group tab. 

This column On this tab Why you need to pay attention
Name Link Group Required by the 'Link Group' column on the 'Template Definition' tab.

Read more: Understanding Object Dependencies

Link Tab

The screenshot below shows an example of configured links. The fields are the same as the ones in the Creating a Link step in Server Management, using the above instructions on this page.

Dependencies

The Link tab has a direct dependency on information from the Link Group tab, because a column on the Link tab directly references a column on the Link Group tab. The Template Definition tab also has a direct dependency on the Link tab.

This column On this tab Why you need to pay attention
Link Group Link Required by the 'Name' column on the 'Link Group' tab.
Name Link Required by the 'Link Name' column on the 'Template Definition' tab.

Related: Updating the Configuration


Release History

Comments are closed