Show TOC

Function documentationCalculated Columns Locate this document in the navigation structure

 

This action is used to add calculated columns to an XML data set. A calculated column contains a calculated value such as a total or an average. You must select an XML document to which you want to add calculated values. For example, you can choose a query result, define the additional column(s) you want to add to the result set, and create an expression to define the column contents.

Features

The properties for this action are listed in the following table:

Property

Data Type

Access

Use

Source

String

In and out

Defines the path to the source XML document.

Output

XML

In and out

Specifies the XML output that contains the calculated columns.

Success

Boolean

Out

Indicates whether the action succeeded or failed. If it failed, errors are displayed in the server trace log.

Example

You can add a calculated column that is the average of all columns to a tag query result set. The tag query is defined as a history event query and returns the following tags:

  • CylTemp1

  • CylTemp2

  • CylTemp3

  • CylTemp4

The output of the query is configured as the document source for this action. The column that holds the average value is created by adding a new column in the configuration screen. The name, data range, data type, and calculation expression must be entered. The name field indicates the name of the column that you want to add to the data set, and the min and max ranges are the minimum and maximum allowable values in the new column.

You can add a new AVG_TEMP column to the data set that contains the average temperature of CylTemp1 through CylTemp4. The XML output of the action contains the original data set with the new AVG_TEMP column added. The expression screen can use any expressions available in Business Logic Services.