Skip to content

Define an indicator

The steps to define an indicator are:

  1. Create the Indicator in a group
  2. Edit the indicator
    • Give it a name
    • Assign a script
    • Assign arguments
    • Calculate
  3. Save the indicator

Create an Indicator

To start definition of a new indicator, right-click a group node and select Add New Indicator.

This will open an empty Indicator view with details to be filled. The same dialog is used for editing an existing indicator

Define details of a simple indicator

Give it a name and optionally a description. The name must be unique within the group.

Drag a script from the Script Explorer in the Script Manager to specify the script to use ith the indicator

The path of the script is shown.

And the list of parameters is populated based upon detail information from the script.

Each parameter has a name, description and type. Depending on the type the user may define the input to use. For simple types like integer, float, double, string, boolean the value is ususally a constant while more complex types may use object references.

Specify the values to use and click the Calculate button to evaluate the script with the parameters

The value is calculated

Press the Save button to store the Indicator definition (script reference, parameter list and calculated value).

The Indicator name appears in the Indicator Explorer.

Once created the indicator can be re-calculated.

Right-click and choose Calculate (or select the indicator in the Explorer and press F5).

This will update the indicator with the calculated value.

When an Indicator is selected in the Explorer the properties can be seen in the PropertiesControl – including the latest calculated value.

Define details of a more complex indicator

If the parameters of a script are more complex than simple types, e.g. a data series, the parameter definition can be supplied with drag/drop from the relevant Explorer.

Create a new indicator and drag a script that takes a data series as input.

The populated parameter list shows the parameter (in this case named dataseries) with a type of IDataseries.

This represents an entity in the time series manager.

The value type can in this cas be either Entity id or Entity descriptor. In both cases the Value displayed is the path of the value/object, but in the database the specification is different. For Entity id the Indicator holds the ID of the object, i.e. a guid. For Entity descriptor the database holds the path of the entity.

The ID is constant in case the entity changes name, but will change if the object is deleted and re-creted with the same name.

The path identifies the entity by name and location. The value type to use will depend upon the nature of the referred entity in order not to break the Indicator definition.

To specify the data series to use, simply drag/drop it from the Time series Explorer into the Value field of the Indictor.

The Value displays the path of the entity.

Too complex scripts

Not all scripts can be used for indicators. The return values of the script must be a simply type representing a number (integer, float, double).

The below illustrates the behvior if an in-eligible script is being used.

Script AddToSeries takes 2 arguments: a data series and a number. It runs a tool to add the number to the value of a series. It returns the new dataseries of type IDataseries.

An attempt to use the script for an indicator definition will result in an error dialog informing that only scripts retuning a number can be used,

If a valid script is being used for the definition of an indicator, and this script then later is modified in the Script Manager to return other than a number a similar erro will occur when attempting to calculate the indicator.

If for instance AverageOfSeries returns something the than the average number evaluation of it will display this pop-up.