Comments Button (4.3.2)

This article applies to versions 4.3.2 and earlier of P2 Explorer. For help on the latest version of the Comments Button, see Comments Button.

Overview

The Comments Button displays a small icon which, when clicked, launches a floating window that allows the user to enter and view comments relating to a specific entity and context. The comments are stored in P2 Server and can be viewed anywhere in Explorer where the same context is used.

The following diagram shows a comments button:

 
Start Date/Time: The date/time from which to display comments. This will be entered as the default start of the search date range.
End Date/Time: The date/time at which to stop displaying comments. This will be entered as the default end of the search date range.
Entity: The entity that all these comments apply to. All comments entered in this box will apply to this entity.
Context: The situation in which these comments apply. All comments entered in this box will have this context. If another comment box is placed on another page, with this same context and for the same entity, the comments for both will appear in both comment boxes. If the entity is the same but the context is different, the comments will be shown independently.

 


Tutorial

In this tutorial, we’ll look at adding two Comment Buttons to a schematic diagram that displays comments on Tubing Head Pressure and Tubing Head Pressure. We'll then create another page to show how the context allows the comments to appear on different displays in P2 Explorer.

commentsdisplay

Let’s go through this process, step-by-step.


Step by Step: Creating Comments Buttons to Display Comments Across Pages

Before you start, open a new tab in Explorer and click the “Create a New Page in Studio Mode” thumbnail. Choose the precision layout.

If you have access to the training environment, you can follow the steps exactly as outlined here. Otherwise, you will need to adjust the configuration to suit your data.

Step 1. Add a Background Image

When creating a schematic, usually the first thing we want to is add a background image. Let's use the Image component to do this.

  • Drag the Image component onto the canvas, and resize it so that it fits the page.
  • Configure it as follows:
    • Display: (Option) Default
    • Default Image URL: https://cadrondev01.petroleumplace.com/ExplorerImages/GasLift.gif

 

Step 2. Add Source Data

We will need some source data to display on the schematic, so let's add this now. We're going to add a Time Series model.

  • Below the canvas, click the button labelled “Add Data”.
  • Add a model (don't worry about any attributes) and configure the Time Series data as follows:
    • Name: TimeSeries
    • Using: Entities
    • Entities: (List) TWell1
    • Add 2 attributes, as follows:
      • Template: Oil Producing Well, Attribute: Tubing Head Pressure
      • Template: Oil Producing Well, Attribute: Tubing Head Temperature
    • Group By: Entity
    • Parameters:
      • SampleInterval: (Number) 86400
      • SampleMethod: (Text) Average
      • StartTime: (Event) startTime
      • EndTime: (Event) endTime

 

Step 3.  Create the Event Defaults

commentsevents

You can create an event at any time. Here we want to set the default values for the start and end time events.

  • Click the Event Defaults button on the far right side of the Studio canvas.
  • Create an event called “endTime” with a Datetime value of 22/03/2015 12:00:00 AM.
  • Create an event called "startTime" with a Datetime value of 21/03/2015 12:00:00 AM.

 

Step 4. Add 2 Data Labels to the Page

commentsdatalabel

Drag and drop 2 Data Label components onto the canvas, and position them near the Tubing Head on the diagram.

  • Configure the 1st label as follows:
    • Source Data: TimeSeries
    • Value Column: (Text) [Oil Producing Well]:Tubing Head Pressure Value
  • Configure the 2nd label as follows:
    • Source Data: TimeSeries
    • Value Column: (Text) [Oil Producing Well]:Tubing Head Temperature Value

 

Step 5.  Add 2 Text Labels to the Page

commentstextlabel

Drag and drop 2 Text Label components onto the canvas, and position them near the Data Labels on the diagram.

  • Configure the 1st label as follows:
    • Content: psi
  • Configure the 2nd label as follows:
    • Content: degC

 

Step 6. Add the Comments Buttons

Drag and drop 2 Comments Button components onto the canvas, and position them near the Text Labels on the diagram.

  • Configure the 1st Comment Button as follows:
    • Start Date: (Event) startTime
    • End Date: (Event) endTime
    • Entity: (Text) TWell 1[Oil Producing Well]:Tubing Head Pressure!Actual
    • Context: (Text) THP
  • Configure the 2nd Comment Button as follows:
    • Start Date: (Event) startTime
    • End Date: (Event) endTime
    • Entity: (Text) TWell 1[Oil Producing Well]:Tubing Head Temperature!Actual
    • Context: (Text) THT

 

Step 7. Add a Comment

commentscomment

We're going to add a comment or two against the Tubing Head Pressure entity, so we can see how this thing works.

  • Click the Finish and Open livemode button on the Studio toolbar to save your page and open it in run-time.
  • Click the Comments Button for the Tubing Head Pressure entity.
  • Type a comment in the comment box and press Enter.

Remember that in the previous step we configured this Comments Button with a context of THP. In the next step, we'll see how the combined entity name and context allows you to see this comment on a completely different page.

 

Step 8. Create a New Page and Add a Comments Button

Open a new tab in Explorer and click the “Create a New Page in Studio Mode” thumbnail. Choose the grid layout.

  • Drag the Comments Button component onto the canvas.
  • Configure it as follows:
    • Start Date: (Event) startTime
    • End Date: (Event) endTime
    • Entity: (Text) TWell 1[Oil Producing Well]:Tubing Head Pressure!Actual
    • Context: (Text) THP
  • Configure the following events for the page:
    • startTime: (Datetime)  22/03/2015 12:00:00 AM
    • endTime: (Datetime) 21/03/2015 12:00:00 AM
  • Click the Finish and Open livemode button on the Studio toolbar to save your page and open it in run-time.
  • Click the Comments Button. You should see the comment that you entered in the previous step.

 

Step 9. All done!  

commentsdisplay

Congratulations! You now have a schematic page with two Comments Buttons. You can enter comments against the entities that they have been configured to. You can also view the comments made against the tubing head pressure entity on another page. If you want, have a play around with the configuration, and see what happens when you change the entity names or contexts.

save Don’t forget to save your page!

Leave a Reply

Your email address will not be published. Required fields are marked *