Assigning Attributes to a Template

This article is about how to create and assign attributes to a template using P2 Server Management Studio or the Import/Export spreadsheet. For general information on attributes, see:  Attributes.

Where an entity defines a real world or conceptual object, it is the attributes of an entity that describe the characteristics of that object. It’s these characteristics, or attributes, that are associated with data that we generally want to model. For example, the suction pressure of a pump. We can break these attributes down even further to gain an insight into different aspects of that attribute, called attribute values. For example, the maximum allowed suction pressure.

In this article, we will be creating attributes and attribute values for a template.

Related: Templates

Management Studio

In P2 Server Management Studio, you must create attributes and attribute values as part of the process of creating or editing a template. You can read all about that process in the "Creating Templates and Attributes" article.

create-template

 

Related: Creating Templates and Attributes

 

Import/Export Spreadsheet

If you want to create attributes as part of a bulk configuration, you need to use the Attribute Definition tab in the Import/Export spreadsheet. This is where you define the structure and data types of the attributes.

Related: Import/Export

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 template group that allows it to be tracked across systems, and when it is renamed. It is automatically generated by the system. 

How to Use the Attribute Definition tab

The screenshot below shows an example of a template that has some attributes and attribute values assigned (click to enlarge). 

attributedefinitiontab

There are 2 important parts to this sheet: the Attribute Definitions and the Attribute Value Definitions.

Let's first look at the Attribute Definitions.

attributedefinitions

You can see that the Oil Producing Well template has been assigned the following attributes:

  • THP
  • THT
  • Status
  • Choke
  • Gas Production
  • Oil Production
  • Water Production
  • Oil Flowrate
  • Mercury Content
  • CO2 Content
  • Hrs Online

Each attribute is on a different row, and each attribute has a Data Type, Attribute Group, and Description.

Now, let's focus on the THP attribute on row 3, and scan across to look at columns G-J. These columns define an attribute value definition for the planned THP value from the well. 

attributevaluedefinitions

To add more attribute value definitions for an attribute, you need to add more repeating sections like G-J. If you look at columns K-N, you will see that they add another attribute value definition - this time for the Actual THP value. 

You can add as many attribute value definitions as you need to, such as Max or Min, by adding more repeating sections like columns G-J.

Note that ONE of these must be the default value (Is Default = TRUE) so that P2 Server knows what data to serve if an attribute value definition is not specified by a consuming application.

 

Comments are closed