Tank (4.4)

This article applies to versions 4.4 to 4.5.2 of P2 Explorer. For more, see Release History. For the latest help, see Tank.

Overview

The Tank displays a data value as the percentage fill in a simulated tank shape.

The following diagram shows a Tank being configured:

Tank 4.4

Value: The actual value that determines the amount that the tank is filled.
Minimum Value: The minimum value below which the fill cannot fall.
Maximum Value: The maximum value allowed for the fill.
Number of Ticks: The number of tick marks to display on the tank. The number specified here serves as a guide, Explorer will determine the final number of tick marks so that they are evenly spaced between the Minimum Value and the Maximum Value. Leave this blank to display no tick marks.
Show Value: Select this check box if you want to display the numerical value of the fill.
Decimals: The number of decimal points for the displayed value. If the value does not contain decimal points, none will be added.
Style: The style you want to apply to the Tank component. If you are a Style Administrator, you can add a new Tank style.

Related: Adding a Tank style, Interacting with the Tank component

 


Tutorial: Creating a Tank That Displays Stored Oil Volumes for a Selected Entity

If you're unfamiliar with the process of building pages, read the article Building an Explorer Page.

The Tank is a useful component to display volume levels. In this topic, we’ll show you how to use the Tank to display the volume of oil stored for a selected entity. This is often used in production summary reports.

Tank 4.4

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

New Page button on ribbon

Before you start, click the New Page button on the Home tab of the ribbon. Choose the Grid layout.

Grid Layout 4.4

  • For this exercise, we'll keep the 4 grid cells.
  • Assign the second column a width of 300.
  • Assign a column spacing of 20.
  • Assign the first row a height of 200.
  • Assign a row spacing of 20.

Related: Grid Layout tutorial

 

Step 2. Add the Tank

Tank 4.4

Drag and drop the Tank component onto a grid cell. The Tank is in the Display Display group icon group.

 

Step 3. Configure the Tank

Tank 4.4

In this example, we want the Tank to show us how much oil is stored for a selected well, at a given date. The value will fall between a minimum and maximum value. We'll configure these 3 values separately.

Related: Data SelectorFilter Column and Filter Value

Configuring the Value

  • This is the value used for the tank fill. Open the Value Data Selector by clicking on the field. You will notice that the Value Data selector Value icon tab is automatically selected. However, for this tutorial, we want to get data from the Well Production Data dataset query, so click the Dataset Dataset icon tab. Fill in the fields as follows: 
     

    • Dataset Query: WellProductionData
    • Filter Column: Entity
    • Filter Value: (Variable) selectedEntities
      Note: You will need to type this in, it will not be available for selection.
    • Value Column: OilStored
      Note: See Filter Column and Filter Value for more information on how these fields work.
       
    • EndDate: (Variable) endTime
    • EntitiesList: (Variable) selectedEntities
      Note: You will need to type this in, it will not be available for selection.
    • StartDate: (Variable) startTime

Tank 4.4

TOP TIP

Click the Preview button to check that you are getting data. If the preview window is blank, you may have filled in a parameter incorrectly.

 

Configuring the Minimum Value:

  • Click away from the Data Selector. 
  • Open the Minimum Value Data Selector by clicking on the field. Stay on the Value Data selector Value icon tab. 
  • Type 0 into the Value field.

Here we are saying that the tank level should never fall below zero.  

Tank 4.4

Configuring the Maximum Value:

  • Click away from the Data Selector.
  • Open the Maximum Value Data Selector by clicking on the field. Click the Dataset Dataset icon tab. Fill in the fields as follows: 
     

    • Dataset Query: WellPlanningData
    • Filter Column: Entity
    • Filter Value: (Variable) selectedEntities
      Note: You will now be able to select this from the drop-down list.
    • Value Column: OilPlanned
       
    • EndDate: (Variable) endTime
    • EntitiesList: (Variable) selectedEntities
      Note: You will now be able to select this from the drop-down list.
    • StartDate: (Variable) startTime

Tank 4.4

Configuring the Number of Ticks:

  • Click away from the Data Selector. 
  • Open the Number of Ticks Data Selector by clicking on the field. Stay on the Value Data selector Value icon tab. 
  • Type 2 into the Value field.

Here we are saying that the tank should show 2 tick marks to indicate the level.  

Tank 4.4

Configuring Show Value:

  • Click away from the Data Selector. 
  • Open the Show Value Data Selector by clicking on the field. Stay on the Value Data selector Value icon tab. 
  • Select the Value check box.

Here we are saying that the tank should display the value used for the fill.  

Tank 4.4

You do not need to fill in the remaining fields.

 

Step 4. Set the Defaults 

Target Bar 4.4 default values

At the moment, the page shows the default values that have been set for the WellProductionData dataset in P2 Server. This may not suit your intended purpose.

BEST PRACTICE

You should specify default values that are appropriate for your intended purpose.

 

Let’s change the default data that is displayed. We do this by creating defaults for the variables specified in the components in the previous steps. The variable we are interested in is the selectedEntities variable. We want the initial value of the Tank for be for the well, Beardy. We can set that here so that the user does not have to specify it.

  • Click the Default Values button on the Studio toolbar.
  • Click the Add button.
  • Add a variable called selectedEntities with a type of EntityList. Type in the following entity name: Beardy

You should now see the Tank update to reflect the new default.  

Related: Variables, Default Values

 

Step 5. Add the Entity Selector

Tank 4.4

In this step, we want to add an Entity Selector that will allow the user to select a well from a specific point in the hierarchy, to drive the volume level of the tank. We need to use the Advanced configuration for this.

Click the Advanced button, and configure the fields as follows:

  • Select Mode: Single
  • Selected Entity: selectedEntities (you may need to type this in if it is not available in the drop-down list)
    This is the variable that the Entity Selector uses to store the name of the entity that the user selects.
  • Hierarchy Name: (Text) P2 Corporate
  • Start Node: (Entity) Glen Innes
    Only entities that are children of this node will be displayed. 
  • Number of Selections: 1 

Related: Entity Selector tutorial

 

Step 6. All done!

Tank 4.4

Congratulations! You now have a tank that will change volume levels according to the selected entity.

  • Click the preview preview button on the Studio toolbar to see what your page will look like in run-time.
  • Select different entities and observe the changes in the tank level.

save Don’t forget to save your page!


Release History

Leave a Reply

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