This article applies to versions 4.4.0-4.4.6 of P2 Explorer. For the latest, see Comments Button.
Overview
The Comments Button displays a small icon ( or ) which, when clicked, launches a window that allows users 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 white icon indicates that no comments have yet been made for that entity and context, whereas the black icon indicates that comments have already been made. When the button is clicked, a floating comments window appears.
Users can add and view comments for an entity and context, within a specified time range. Users cannot change that time range. However, users can search for additional comments within other time ranges, but cannot add comments against those other time ranges.
TOP TIP
If you want to position the comments button very close to another component, you need to use Precision Layout. If you drag a Precision Layout onto a grid cell, then you will be able to move the 'set' of components easily, by moving the grid cell around.
There are 2 configuration modes for the Comments Button. Basic mode (shown below) shows the options most commonly used. Advanced mode (which we will use in the tutorial) allows you to change the type of properties used.
Basic Mode
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.
Style:
The style you want to apply to the Comments Button. If you are a Style Administrator, you can add a new Comments Button style.
Advanced Mode
In Advanced mode, you have the option of switching between variable and text fields. The first 3 fields are set to variables initially, and have default values associated with them.
Context is the mechanism by which P2 Explorer exposes all comments related to a specific entity, and this is something that the page designer does when creating a page.
A comment’s context is some extra information that is added to the comment, and is used to associate comments with other comments for that entity that use the same context.
As an entity can be used on lots of different pages, adding context to a comment means that you can see all of the comments that have been made for that entity with that context, every time you open the comments box, no matter which page you are looking at.
All comments entered via a Comments Button component on a page has the context that is specified by the page designer. For example, if the comments on a page all have the context of “Report”, Explorer can apply filtering to all the comments in the system to only show comments for an entity with the "Report" context.
Taking this a step further, a page designer can use the same context for the same entity on a completely different page. When a comment is applied to that entity, users will see all comments for that entity and context (e.g. Report), even though they are displayed on different pages.
SEE IT IN ACTION! Watch this video to see how comments with context work on a page.
Tutorial: Adding Comments Buttons to an Image
If you're unfamiliar with the process of building pages, read the article Building an Explorer Page.
In this tutorial, we’ll look at adding two Comment Buttons to an image, for displaying comments on Tubing Head Pressure and Tubing Head Temperature. We'll then create another page to show how the context allows the comments to appear on different displays in P2 Explorer.
Let’s go through this process, step-by-step.
Note: This configuration uses the Sample Data table and datasets that can be optionally made available during initial installation and setup. If you don't have access to this data, you will need to adjust the configuration to suit your data at your site.
Step 1. Prepare a Studio Page
Before you start, click the New Page button on the Home tab of the ribbon. Choose the Precision layout.
Note: We need to spend a bit of time setting up so you can see the comments in context.
Step 2. Add a Background Image
A background image is often used in schematic-style pages. 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: (Options) Center
Default Image URL: https://cadrondev01.petroleumplace.com/ExplorerImages/GasLift.gif
Note: You will need to change the image to one that is available at your site.
Drag and drop 2 Comments Button components onto the canvas, and position them near the Text Labels on the diagram. The Comments Button is in the Display group.
Click the Advanced button to see additional options.
Configure the 1st Comment Button as follows, to connect it with the tag used for the 1st Data Label:
Entity: (Text) 015AC105L.PV
Context: (Text) THP
Configure the 2nd Comment Button as follows, to connect it with the tag used for the 2nd Data Label:
Entity: (Text) 015AC108L.PV
Context: (Text) THT
Step 6. Add a Comment
We're going to add a comment or two against the Tubing Head Pressure entity, so we can see how it works.
Click the Finish and Open button on the Studio toolbar to save your page and open it in run-time.
Click the Comments Button for the Tubing Head Pressure tag (the first one you added).
Type a comment in the comment box and press Enter. Notice that the comments button now turns black - this indicates that there are comments for this tag.
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 7. Create a New Page and Add a Comments Button
Click the New Page button on the Home tab of the ribbon. Choose the Grid layout.
Drag the Comments Button component onto the canvas.
Configure it as follows:
Entity: (Text) 015AC105L.PV
Context: (Text) THP
Click the Finish and Open 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 8. All done!
Congratulations! You now have a schematic-style 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.
Comments Button (4.4)
ON THIS PAGE:
This article applies to versions 4.4.0-4.4.6 of P2 Explorer. For the latest, see Comments Button.
Overview
The Comments Button displays a small icon (
or
) which, when clicked, launches a window that allows users 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 white icon indicates that no comments have yet been made for that entity and context, whereas the black icon indicates that comments have already been made. When the button is clicked, a floating comments window appears.
Users can add and view comments for an entity and context, within a specified time range. Users cannot change that time range. However, users can search for additional comments within other time ranges, but cannot add comments against those other time ranges.
If you want to position the comments button very close to another component, you need to use Precision Layout. If you drag a Precision Layout onto a grid cell, then you will be able to move the 'set' of components easily, by moving the grid cell around.
Related: Using Comments for collaboration in display mode, Adding a new Comments Button style, Comments: Communicating with Context
Configuring the Comments Button
There are 2 configuration modes for the Comments Button. Basic mode (shown below) shows the options most commonly used. Advanced mode (which we will use in the tutorial) allows you to change the type of properties used.
Basic Mode
Advanced Mode
In Advanced mode, you have the option of switching between variable and text fields. The first 3 fields are set to variables initially, and have default values associated with them.
Related: Variables, Default Values
What is Context?
Context is the mechanism by which P2 Explorer exposes all comments related to a specific entity, and this is something that the page designer does when creating a page.
A comment’s context is some extra information that is added to the comment, and is used to associate comments with other comments for that entity that use the same context.
As an entity can be used on lots of different pages, adding context to a comment means that you can see all of the comments that have been made for that entity with that context, every time you open the comments box, no matter which page you are looking at.
All comments entered via a Comments Button component on a page has the context that is specified by the page designer. For example, if the comments on a page all have the context of “Report”, Explorer can apply filtering to all the comments in the system to only show comments for an entity with the "Report" context.
Taking this a step further, a page designer can use the same context for the same entity on a completely different page. When a comment is applied to that entity, users will see all comments for that entity and context (e.g. Report), even though they are displayed on different pages.
SEE IT IN ACTION! Watch this video to see how comments with context work on a page.
Tutorial: Adding Comments Buttons to an Image
If you're unfamiliar with the process of building pages, read the article Building an Explorer Page.
In this tutorial, we’ll look at adding two Comment Buttons to an image, for displaying comments on Tubing Head Pressure and Tubing Head Temperature. We'll then create another page to show how the context allows the comments to appear on different displays in P2 Explorer.
Let’s go through this process, step-by-step.
Note: This configuration uses the Sample Data table and datasets that can be optionally made available during initial installation and setup. If you don't have access to this data, you will need to adjust the configuration to suit your data at your site.
Step 1. Prepare a Studio Page
Before you start, click the New Page button on the Home tab of the ribbon. Choose the Precision layout.
Related: Precision Layout tutorial
Note: We need to spend a bit of time setting up so you can see the comments in context.
Step 2. Add a Background Image
A background image is often used in schematic-style pages. Let's use the Image component to do this.
Note: You will need to change the image to one that is available at your site.
Related: Image tutorial
Step 3. Add 2 Data Labels to the Page
Drag and drop 2 Data Label components onto the canvas, and position them near the Tubing Head on the diagram.
Note: You will need to adjust the configuration to suit your data at your site.
Related: Data Label tutorial, Data Selector
Step 4. Add 2 Text Labels to the Page
Drag and drop 2 Text Label components onto the canvas, and position them near the Data Labels on the diagram.
Related: Text Label tutorial
Step 5. Add the Comments Buttons
Drag and drop 2 Comments Button components onto the canvas, and position them near the Text Labels on the diagram. The Comments Button is in the Display
group.
Click the Advanced button to see additional options.
Step 6. Add a Comment
We're going to add a comment or two against the Tubing Head Pressure entity, so we can see how it works.
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 7. Create a New Page and Add a Comments Button
Click the New Page button on the Home tab of the ribbon. Choose the Grid layout.
Step 8. All done!
Congratulations! You now have a schematic-style 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.
Release History