The following operators are available: sum, product, card, min, max, mean, convert.
Sum
XML tag: |
Sum |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<sum> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value |
|
Result type: |
Data type of set of values used, for mixed data types within set always DOUBLE |
|
Description: |
Creates the sum of all elements in the set of values. |
|
Calculation (PPM3/PPM4) |
Result |
Sum of values contained in the set of values. NULL if the transferred set is empty. |
Error |
If at least one element in the set of values is of an invalid data type. |
|
Example: |
- |
Product
XML tag: |
Product |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<product> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value |
|
Result type: |
Data type of set of values used, for mixed data types within set always DOUBLE |
|
Description: |
Creates the product of all elements in the set of values. |
|
Calculation (PPM3/PPM4) |
Result |
Multiplication of values contained in the set of values. NULL if the transferred set is empty. |
Error |
If at least one element in the set of values is of an invalid data type. |
|
Example: |
- |
Cardinality
XML tag: |
Card |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<card> |
|
Operands: |
All data types of the set of values specified |
|
Result: |
Value |
|
Result type: |
always LONG |
|
Calculation (PPM3/PPM4) |
Result |
Calculates the total number of elements in the set of values. For an empty set, the return value is 0. |
Error |
None |
|
Example: |
- |
Minimum
XML tag: |
Min |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<min> |
|
Operands: |
Numerical data types and TIME (TIMESTAMP, DATE), DAY, TIMEOFDAY |
|
Result: |
Value |
|
Result type: |
Data type of set of values |
|
Description: |
Returns the smallest value in the set of values. |
|
Calculation (PPM3/PPM4) |
Result |
NULL if the set of values is empty |
Error |
None |
|
Example: |
- |
Maximum
XML tag: |
Max |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<max> |
|
Operands: |
Numerical data types and TIME (TIMESTAMP, DATE), DAY, TIMEOFDAY |
|
Result: |
Value |
|
Result type: |
Data type of set of values |
|
Description: |
Returns the greatest value in the set. |
|
Calculation (PPM3/PPM4) |
Result |
NULL if the set of values is empty |
Error |
None |
|
Example: |
- |
Mean
XML tag: |
Mean |
|
Operands: |
exactly one set of values |
|
Synopsis: |
<mean> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value |
|
Result type: |
Operand data type |
|
Calculation (PPM3) |
Result |
Mean of the numerical values contained in the set. NULL if operand is equal to an empty set. |
Error |
If the data type is invalid or at least one operand equals NULL. |
|
Calculation (PPM4) |
Result |
Mean of the numerical values contained in the set. NULL if operand is an empty set or equals NULL. |
Error |
If at least one element in the set of values is of an invalid data type. |
|
Example: |
<mean> |
Data type conversion
XML tag: |
convert |
|
Operands: |
exactly one value |
|
Synopsis: |
<convert datatype="..."> |
|
Operands: |
TEXT or numerical data type, returns the input value for the conversion. |
|
Attribute: |
The datatype attribute specifies the data type into which the input value is to be converted. |
|
Result: |
Value converted into the data type specified |
|
Result type: |
LONG, DOUBLE, FREQUENCY, BOOLEAN, TEXT, TIME, TIMESPAN, FACTORYTIMESPAN, DAY, PERCENTAGE |
|
Description: |
Conversion of a numerical data type (e.g., LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE) into another numerical data type. Conversion of the TEXT data type into one of these data types: LONG, DOUBLE, BOOLEAN, TIMESPAN, or FREQUENCY. After the conversion, the result is written in base scaling to the result attribute. Conversion of the LONG data type to TEXT, with leading zeros and separators being removed. The result of the conversion is the converted number without separators in one string. In the example below, the LONG value 000300080191 is converted into the TEXT value 300080191. <convert datatype="TEXT"> It is possible to convert any data type to TEXT, e.g.:
The scaling used for the output corresponds to the one at the object, e.g.:
|
|
Calculation (PPM4 only) |
Result |
Returns the converted value of the operand. NULL if the operand returns NULL |
Error |
If conversion fails |
|
Example: |
<convert datatype="LONG"> An assumed value of 456 for the AT_ABC attribute of TEXT type is converted to the LONG data type. |