Data Selector (4.4.1)

Related: For Explorer versions 4.3.2 and earlier, read the help on Add Time Series Data and Adding a Dataset. For help on the latest version of the data selector, see Data Selector.

Overview

Many of the Explorer components are used for displaying data. For example, the data label, charts, the dataset table, target bars, meters.

Component data needs to be defined during design time, in Explorer Studio.

This article explains how to select and define data, using the data selector editor.

Data Selector Features

To open the data selector, click the drop-down list on a component property that shows the text "Click to configure data...", for example the Value property on the properties panel of the Data Label component.

Click the Drop-Down List "Click to configure data"

The data selector opens as a separate panel below the property. The contents of this panel may vary, according to the type of data to configure (the data category) and how that data is to be returned (as a list, a set, or as a single data point).

1. Value:

This is the component property which uses the configured data. The name varies between different component properties.

2. Data Category:

Click to select one of the data categories.

3. Configure Data:

Configure data for the selected data category.

 

A Component's Data

Depending on the data component, data can be defined for more than one of the properties.

For example, a Meter component has Value data (the value measured on the meter) as well as a whole series of Measures, a Minimum Value and number of Ticks.

Some of the properties on a Meter component

Another example is the Data Label component, which has Value data (a numerical value that is displayed on the label in run-time), as well as Decimals, for formatting the data.

Related: Components in Explorer

Data Categories

Depending on what a component is used for, there can be up to five separate Data Categories to choose from, when you select your data.

Dataset Tabular data returned from a dataset datasource. Using Dataset Data  

Ad hoc Calculation An ad hoc calculation using tags and/or attributes. Using Ad hoc Calculation Data  

Attribute A piece of data describing a specific characteristic of an entity. Using Attribute Data  

Tag A piece of data or a calculation. This can also be referenced by an attribute. Using Tag Data  

Value A fixed or variable numerical value, defined in Studio. Using Value Data  

Categories are unavailable for components that can't use them. For example, the Combo Box component only has the dataset Dataset and Value categories available:

Setting a Variable

When configuring data for a component, you will find that most of the properties have a Variable option.

For example, when you configure a new data label to use an ad hoc calculation, all of the calculation properties variable options, as shown below.

To use a variable, click the variable button, then select a variable from the drop-down list or type in a variable name, ensuring the variable suits the property. For example, when you configure Sample Method to use a variable, that variable should be configured to have legitimate sample methods (Last Known Value, Average, Linear Interpolate and Raw).

Note that only variables of the correct type are available in the drop-down list (for example, where the property expects text, only text variables are available).

Example

The following example illustrates how you can select a List variable for an Option Links' Option Values, and Text variable for its Selected Option.

Related: Using Variables in P2 Explorer

1. List variable added to Default Values: Variable Name: ListofQuarters; Comma separated text values: Q1, Q2, Q3, Q4.
2. Text variable added to Default Values: Variable Name: selectedQuarter; text value: Q2.
3. List variable assigned to Option Links: Variable ListofQuarters is selected for the Option Links 'Option Values.
4. Text variable assigned to Option Links: Variable selectedQuarter is selected for the Option Links' Selected Option.
5. The Option Links: Showing Option Values (ListofQuarters) in the Option Links buttons, with Selected Option (selectedQuarter) underlined.
 

Page Defaults

When you assign data to a component's property, you will find that very often the page default has already been assigned.

For example, when you configure a new data label to use an ad hoc calculation, some of the calculation properties come with page defaults, as shown below:

Page defaults pre-assigned to a new data label

The page defaults are added to the Default Values for a new Studio page

You can view or update the page defaults on the Default Values panel.

 


Selecting and Configuring your Data

Explorer’s Data Selector is used to collect data for properties of components, such as the Value of a Data Label, or the Data used by a Chart.

Watch the video below to see how the different data is selected for a Data Label component. Note that only the currently selected data category is saved when the page is saved.

The video below shows how data is selected for a table.

 


Using Dataset Data

Below is an example of the dataset configuration for a data label's Value property which requires a single numerical value.

A Data Label's Configured Value

1. Component Property:

This is the property that uses the data. In the example used, it is the Value, used for a Data Label.

2. Data Categories:

The selected category is highlighted, with details shown in the panel below the categories tab.

3. Dataset Query:

The dataset query used to source a list of data for this component’s property.

4. Filter Column, Filter Value and Value Column:

Property components that require a single list of data (such as the Data Label's Value property) use these three columns collectively, to specify a single point of data from the result set. Not all property components require this sort of filtering.

Variation: Property components that require a single point of data (such as the Option Links's Option Values property) only use the Value Column

Variation: Property components that require the full set of data (such as the Chart's Data property) do not use these three columns.

5. Dataset Parameters:

Not all queries have dataset parameters, and if they do these will vary depending on the query. These values need to be filled in before you can preview data.

Note: Click Preview to see what columns and values are returned by the query. This is helpful for setting up filtering.

 

How to Select Dataset Data

This example uses a Data Label. Some of the components' properties (such as the Chart's Data) require fewer or no filter details.

Step 1. Click the drop-down list next to the Value property to open the Data Selector.

The Data Selector editor opens, for the Value property.

Step 2. Click the Dataset category.

Step 3. Select and configure the dataset.

Step 3 a) Select a Dataset Query (or set a variable).

In this example, we select the AccountingProdAmts dataset from the Explorer Training Data datasource.

  Browse for a Dataset Query Or Type in a Dataset Query Name
  To browse for a dataset query, click the ellipsis button next to the Dataset Query edit box.   Alternatively, type part of the dataset query name into the Dataset Query edit box, and select a dataset query from the list filtered list.  
   
  The Choose Data window opens, with a list of every dataset query available to this installation of Explorer. Use the search options to locate the one you want. If a dataset has a description, this is listed below the name.   The selected name appears in the Dataset Query edit box.
     
  1. Click on one of the available datasources (listed on the left panel) to filter the available datasets (Explorer Training Data, in this example).    
  2. Type part of the dataset query name in the Search box, or scroll down the list, to locate the dataset you are searching for (AccountingProdAmts, in this example).    
  3. Click on the dataset query, in the right panel.    
  4. Click OK.    
  The selected name appears in the Dataset Query edit box.    

Step 3 b) Set Filter Column, Filter Value and Value Column, where applicable.

  1. In the Filter Column text box type a column name from the dataset result set, as shown in the preview data (or set a variable).
   
  2. In the Filter Value text box, type a value from the dataset result set (as shown in the preview data), matching one of the values from the filter column (or set a variable).
   
  3. In the Value Column text box, type a column name from the dataset result set (or set a variable).
   
  Note how the Filter Column and Value Column are assigned actual column names, as shown in the preview data. Filter Value uses an actual value: ‘Apr’, from the ‘MTH’ column.

Step 3 c) If there are Dataset Parameters, type a value in each one’s corresponding text box (or set a variable).

Step 3 d) Click Preview to view the dataset results. This is useful if you want to see column names and values, for Filtering.

The Dataset Preview window opens, displaying the result set for the selected query dataset and parameters.

The Data Label Value property is configured, and the resulting data is displayed in the Data Label component.

The screenshot below shows how filtering is used to locate a single data point.

Step 4. Click the configured drop-down list, to close it.

 


Using Ad hoc Calculation Data

Below is an example of what a property’s ad hoc calculation configuration looks like.

The full dataset results are required for the chart

Only a single data point required here

1. Component Property:

This is the property that uses the data. In the example used, the data from two calculations using tags is available for the chart.

2. Data Categories:

The selected category is highlighted, with details shown in the panel below the categories tab.

3. Calculations:

Each calculation sources a range of data (for the selected time range, defined by Start Time and End Time) for this component’s property.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single calculation, and this is for a single point in time.

4. Sample Method and Sample Interval:

Sample Method and Sample Interval are used to define the method (e.g. Average) and the interval (e.g. 3600 - measured in seconds) that tag and/or attribute data within any calculations is collected for this component.

5. Start Time and End Time:

These times specify the request interval for data (tags or attributes) that form part of the calculations.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single time: Time.

6. Item:

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), select an Item.

The default is Value - where values of any tags or attributes are used in the calculation. You can also select Confidence from the drop-down list. Confidence is a measure (1 - 100) of the data's accuracy.

Note: Click Preview to see the calculation results in a table.

 

How to Select Ad hoc Calculation Data

This example uses a Chart component.

Step 1. Click the drop-down list next to the Data property to open the Data Selector.

The Data Selector editor opens, for the Data property.

Step 2. Click the Ad-hoc category.

Step 3. Select and configure the ad hoc calculation.

1. Type in a Calculation (or set a variable). For example: {Silver} * 2

See the table on the right, for more on ad hoc calculations.

2. Click the Add button to the right of the Calculations box.
Continue to add new calculations in this way.
3. Select a Sample Method to specify how Server should collect the attributes/tags used in the calculations.

Click the Options button to the right of the Sample Method box, then select a sample method from the drop-down list: Average, Last Known Value, Linear Interpolate or Raw. (Or set a variable.)

4. Select a Sample Interval to specify which interval Server should use to collect the attributes/tags used in the calculations.

Click the Number button to the right of the Sample Interval box, then type in a number. This is the interval, in seconds, and should be a multiple of 60. (Or set a variable.)

5. Select a Start Time (or set a variable) to specify the start of the request interval Server for should use for the attributes/tags used in the calculations.

Click the Time button to the right of the Start Time box, then select a date and time from the date time picker.

6. Select an End Time (or set a variable) to specify the end of the request interval Server for should use for the attributes/tags used in the calculations.

Click the Time button to the right of the End Time box, then select a date and time from the date time picker.

7. Click Preview to see the tag results in a table.
Ad hoc Calculations
Syntax for an Ad hoc Calculation:
A basic calculation is a combination of tags and/or attributes and numbers, with mathematical operators such as multiply *, add +, subtract - and divide %.
Tags and Attributes in a Calculation:
Tags and attributes must be enclosed by curly braces {}.
The attribute name is made up of the following components: Entity, Template, Attribute, Attribute Value, put together in this format: Entity[Template]:Attribute!Attribute Value
Example of an attribute definition: TWell 1[Oil Producing Well]:Casing Pressure!Actual
Note: If you choose not to specify a template, the primary template, current for the retrieved data's timestamp, is the one that gets used. (Primary templates, which are time aware, are defined in Server. Read more about this here.)
Note: If you choose not to specify an attribute value, the default attribute value, current for the retrieved data's timestamp, is used. (Default attribute values, which are time aware, are defined in Server. Read more about this here.)
Example of a basic calculation:
{TWell 1[Oil Producing Well]:Tubing Head Pressure!Target} - {TWell 1[Oil Producing Well]:Tubing Head Pressure!Actual}
More on Calculations:
Refer to the article Mathematical Expressions for syntax on some common mathematical functions to use in your calculations.
For example, here is a calculation using the sqrt (square root) function: sqrt({TWell 1:Casing Pressure} + 20)
 

To use this data, we've configured the chart to use data from the ad hoc calculations as follows: the {Silver}*2 column for a Line Series, the Max({Silver}, -900) column for a second Line Series, and the Y Column, and the Timestamp column as the X Axis Column.

In the screenshot below, you can see the two calculation values {Silver}* 2 and Max({Silver}, -900) plotted along the X Axis (Timestamp).

Step 4. Click the configured drop-down list, to close it.

 


Using Attribute Data

Here is an example of what a property’s attribute configuration looks like, where a set of data is required (such as the Data for a Chart). Note that there is a start time and an end time here for a range of dates, as well as the option to add multiple entities and attributes.

1. Component Property:

This is the property that uses the data. In the example used, data from two separate attributes, for two different entities is available for the chart. This data spans the time range specified by Start Time and End Time.

2. Data Categories:

The selected category is highlighted, with details shown in the panel below the categories tab.

3. Entities and Attributes:

One or more entities is specified here. One or more attributes for the defined entities is specified.

Attributes are qualified by Template, Attribute, and Attribute Value names.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single Entity and a single Attribute.

4. Sample Method and Sample Interval:

These are used to define the method (e.g. Average) and the interval (e.g. 3600 - measured in seconds) that attribute data is collected, for this component.

5. Start Time and End Time:

These times specify the request interval for the various attribute values.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single time: Time.

6. Item:

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), select an Item.

The default is the attribute value's Value. You can also select Name, Timestamp, or Confidence (a measure, from 1 to 100, of the data's accuracy) from the drop-down list.

Note: Click Preview to see the attribute values in a table.

 

How to Select Attribute Data

The Chart requires a set of data, so we’re using this as an example.

Step 1. Click the drop-down list next to the Data property to open the Data Selector.

The Data Selector editor opens, for the Data property.

Step 2. Click the Attribute category.

Step 3. Select and configure the attribute.

1. Type in an Entity name (or set a variable).

Click the Entities button to the right of the Entities box, then start typing an entity name in the Entities box. As you type, a list of matching names appears. Click to select an entity from the list.

2. Click the Add button to the right of the Entities box.
Continue to add new entities in this way.
3. Click the Add button to the right of the Attributes label, to add attributes.
4. In the Template box, type in a Template name. As you type, a list of matching names appears. Click to select a template from the list.
5. In the Attribute box, type in an Attribute name. As you type, a list of matching names appears. Click to select an attribute from the list.

The current default attribute value appears in the Attribute Value box.

6. To change the default Attribute Value, type a new Attribute Value into the Attribute Value box. As you type, a list of matching names appears. Click to select an attribute value from the list.
7. Select a Sample Method (or set a variable) to specify how Server should collect the attribute data.

Click the Options button to the right of the Sample Method box, then select a sample method from the drop-down list: Average, Last Known Value, Linear Interpolate or Raw. (Or set a variable.)

8. Select a Sample Interval (or set a variable) to specify which interval Server should use to collect the attribute data.

Click the Number button to the right of the Sample Interval box, then type in a number. This is the interval, in seconds, and should be a multiple of 60.

9. Select a Start Time (or set a variable) to specify the start of the request interval Server for should use for the attribute.

Click the Time button to the right of the Start Time box, then select a date and time from the date time picker.

10. Select an End Time (or set a variable) to specify the end of the request interval Server for should use for the attributes.

Click the Time button to the right of the End Time box, then select a date and time from the date time picker.

Note: Click Preview to see the tag results in a table.

 
Attributes
The attribute name is made up of the following components: Entity, Template, Attribute, Attribute Value, put together in this format:
Entity[Template]:Attribute!Attribute Value
Entity
Any entity defined in the data model can be used here.
Template
The entity's current primary template is used, unless you define another template.
Attribute
Any attribute that belongs to the specified template may be used.
Attribute Value
The attribute's current default attribute value is inserted. You can replace this with any other attribute value belonging to the attribute.
Read more about Asset Modelling here .

This is what the previewed data looks like, for this example.

Preview of Attribute Data

To use this data, we've configured the chart to use the [Oil Producing Well]:Casing Pressure!Actual column (just for entity TWell 10) for a Line Series Y Column, and the Timestamp column as the X Axis Column.

In the screenshot below, you can see the values for the attribute (TWell 10[Oil Producing Well]:Casing Pressure!Actual) plotted along the X Axis (Timestamp).

Step 4. Click the configured drop-down list, to close it.

 


Using Tag Data

Below is an example of what a property’s tag configuration looks like, where a set of data is required (such as the Data for a Chart). Note that there is a start time and an end time here for a range of dates, as well as the option to add multiple tags.

1. Component Property:

This is the property that uses the data. In the example used, it is the Data property, for the chart.

2. Data Categories:

The selected category is highlighted, with details shown in the panel below the categories tab.

3. Tags:

The tags used to source a a matrix of data for this component's Data property.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single Tag.

4. Sample Method and Sample Interval:

These are used to define the method (e.g. Average) and the interval (e.g. 3600 - measured in seconds) that tag data is collected, for this component's Data property.

5. Start Time and End Time:

These times specify the request interval for the various tag values.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single time: Time.

Item (not shown here):

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), select an Item.

The default is Value - where values of any tags or attributes are used in the calculation. You can also select Confidence from the drop-down list. Confidence is a measure (1 - 100) of the data's accuracy.

Note: Click Preview to see the tag results in a table.

 

How to Select Tag Data

Step 1. Click the drop-down list next to the Data property to open the Data Selector.

The Data Selector editor opens, for the Data property.

Step 2. Click the Tag category.

Step 3. Select and configure the tags.

1. Type in a Tag name (or set a variable).

Click the Tags button to the right of the Tags box, then start typing a tag name. As you type, a list of matching names appears. Click to select a tag from the list.

2. Click the Add button to the right of the Tags box.
Continue to add new tags in this way.
3. Select a Sample Method (or set a variable) to specify how Server should collect the tag data.

Click the Options button to the right of the Sample Method box, then select a sample method from the drop-down list: Average, Last Known Value, Linear Interpolate or Raw. (Or set a variable.)

4. Select a Sample Interval (or set a variable) to specify which interval Server should use to collect the tag data.

Click the Number button to the right of the Sample Interval box, then type in a number. This is the interval, in seconds, and should be a multiple of 60.

5. Select a Start Time (or set a variable) to specify the start of the request interval for the tag data.

Click the Time button to the right of the Start Time box, then select a date and time from the date time picker.

6. Select an End Time (or set a variable) to specify the end of the request interval for the tag data.

Click the Time button to the right of the End Time box, then select a date and time from the date time picker.

7. Click Preview to see the tag results in a table.
Tags
A tag is a time series data item, that has not been modelled into a hierarchy.
A tag can be referenced by an Attribute Value.

 

This is what the previewed data looks like, for this example.

Preview of Tag Data

The Chart's Data property is configured, and the resulting data is available for use in the chart component.

To use this data, we've configured the chart to use the tag data as follows: the Silver column for a Line Series, the Goldenrod column for a second Line Series, and the Timestamp column as the X Axis Column.

In the screenshot below, you can see the values for the two tags, Silver and Goldenrod, plotted along the X Axis (Timestamp).

Step 4. Click the configured drop-down list, to close it.

 


Using Value Data

Here is an example of what a property’s value configuration looks like, where a list of data is required (such as the Option Values for an Option Links) component.

1. Component Property:

This is the property that uses the data. In the example used, it is the Option Values, used by the Option Links component.

2. Data Categories:

The selected category is highlighted, with details shown in the panel below the categories tab.

3. Values:

A set of values. These can be numerical or text.

Variation: For component properties where only a single point of data is used (such as the Data Label's Value), you can only enter a single Value.

How to Select Value Data

Step 1. Click the drop-down list next to the Option Values property to open the Data Selector.

The Data Selector editor opens, for the Option Values property.

Step 2. Click the Value category.

Step 3. Select and configure the values.

Step 3 a) Click the CSV (comma separated values) button to the right of the Values box, then type in a number or string. (Or set a variable.)

Step 3 b) Click the Add button to the right of the Values box, or press the Enter key.

Step 3 c) Keep adding values in this way, until you have all the value options that you want to use.

The Option Links Option Values property is configured, and the resulting data is displayed in the Option Links component.

Step 4. Click the configured drop-down list, to close it.

 

Leave a Reply

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