Data Set Expressions

If your database contains Data Set Row items, you can reference their fields in expressions. You can reference an individual field or you can reference a range of fields (an array).

Data Set Rows are associated with Data Sets. A Data Set Row consists of a single row of fields, each of which can contain an expression. The Data Set with which the Data Set Row is associated defines the order in which the rows of fields appear (each row comprising a separate Data Set Row). The Data Set also defines the properties of the fields, including the type of data that each field contains.

Data Set expressions do not support indirect tags.

The grammar for Data Set expressions is an extension of the grammar for Standard Expressions :

<field>

<field-block> <field> ":" <field>

Where:

All functions support values from single fields, but only the AVERAGE, MAX, MIN, PRODUCT, and SUM functions support values from blocks of fields.

Examples:

Referencing multiple individual fields:

DATA + MOREDATA

This calculates the sum of the values that are stored in the fields named DATA and MOREDATA.

 

Referencing a block of fields:

AVERAGE(A:D)

This calculates the average value of the values that are stored in the fields between, and including, the field named A and the field named D. The same expression could be defined as AVERAGE(D:A) as ClearSCADA automatically determines the range of fields, even if the last field is defined first.

 

Be careful to avoid recursive expressions that create circular references, for example, A = B + C, B = A + D.

Further Information

Data Sets: see Configuring Data Sets in the ClearSCADA Guide to Core Configuration.

Data Set Rows: see Configuring a Data Set Row in the ClearSCADA Guide to Core Configuration.

Accessing the Expression Window in which you specify your expressions.


Disclaimer

ClearSCADA 2017 R3