Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Information Standards Manager

Value expressions

  • Last UpdatedJan 28, 2025
  • 5 minute read

The expression syntax is explained using railway diagrams, where the symbols have the following meaning:

Literal text, i.e. you are supposed to type the symbol(s) in the box, exactly as shown

Placeholder for a Class Library node name (case insensitive), a function expression or a constant value.

Examples of node values:

  • The value of an intrinsic property

  • The value of an extension property

Alternative route to the next part of the expression syntax

Syntax complete

An example of a simple syntax diagram might look like this:

Examples of expressions conforming to this syntax:

./@name

./@description

./@presence

Node value expressions

Node value expressions are references to Class Library nodes (see Context nodes and expression syntax), conforming to the following syntax:

Expression examples:

Expression

Result

./@name

Get the value of the name property of the current context node, or empty

./@description ?? ./@name ?? ./@id

Get the value of the description property of the current context node

If description is empty, get the value of the name property

If the name property is empty, get the value of the id property, or empty

./Extensions[xyz]/@prop1

Get the value of the extension property prop1 from the extension namespace with prefix xyz, for current context node, or empty

./Extensions[xyz][Node1]/@’prop 1’ ?? ./Extensions[xyz]/@prop1

Get the value of the extension property prop 1, under extension node Node1, from the extension namespace with prefix xyz, for current context node

If that property does not exist, get the value of the extension property prop1 from the extension namespace with prefix xyz, for current context node, or empty

./Extensions[iso15926]/@name ?? ./@name

Get the value of the extension property name from the extension namespace with prefix iso15926, for current context node

If that property is missing, get the value of the name property of the current context node, or empty

Default values

The ?? operator is used to specify a default value in cases where an expression evaluates to an empty value:

./@name ?? ./@id

If the expression on the left-hand side evaluates to a non-empty value, that value will be the result of the expression. Opposite, if the left-hand side expression evaluates to an empty value, the value from the expression on the right-hand side will be used. If the right-hand side expression also evaluates to an empty value, the result will be an empty value.

Literal values

Literal values can be used in different positions of an expression, and can express:

Example

Description

./Extensions[‘xyz’]

The extension namespace prefix xyz in this example is said to be a literal string value

Literal string values that contains alphanumeric characters only (starting with a letter) might be expressed without the start- and end-quote character. To be on the safe side, it is recommended to start and end literal string values with the single quote character

color="rgb(255,0,0)"

The values 255, 0 and 0, supplied as arguments to the function rgb in this example is said to be literal integer values

Literal integer values can contain the digits 0-9, and can in certain cases be prefixed with a "–" (minus) sign, to specify a negative value

color="#ff0000"

The value #ff0000 in this example is said to be a literal hexadecimal colour value

A literal hexadecimal colour value has to start with the # (number sign), followed by exactly six hexadecimal digits (i.e. 0-9, a, b, c, d, e or f)

mergeCells="true"

The value true in this example is said to be a literal Boolean value

Literal Boolean values can be true or false

Variable references

Variables are defined in the dedicated Variables section of a report configuration:

<Variables>

<Variable geicl:id="includePermissibleAttributesOnly" value="true"/>

</Variables>

The value of a variable can be referenced in other sections of a report configuration by specifying the identifier of the variable, prefixed with $ (dollar sign):

Expression examples:

Expression

Result

$includePermissibleAttributesOnly

Get the value of the includePermissibleAttributesOnly variable, or empty

$includePermissibleAttributesOnly ?? true

Get the value of the includePermissibleAttributesOnly variable

If the variable includePermissibleAttributesOnly has not been defined, or is empty, the value true will be used

./@$propertyName

A variable can be used to replace a hard-coded property name. Using this approach, you can create flexible configurations, that e.g. allows a user to select what property to display in a given column

Collection expressions

A Class Library structure consist of nodes and collections (see Context nodes and expression syntax), where individual nodes, such as a Class an Attribute, an Enumeration List, and so on. are members of their respective collections.

In expression syntax, items of a collection can be accessed by specifying the index of the item in square brackets. When accessing an item in a Class Library intrinsic collection (for example, the collection of Attribute Classes), the index value can either be the Identifier of the item or an Aspect token of the item.

There are also some functions that operates on collections.

Collection expression examples:

Expression

Result

./Enumerations[‘myList’]

Get the item (i.e. Enumeration List) where the identifier or an Aspect token corresponds to the value myList

./Attributes[‘Attributes.ObjectName’]

Get the item (i.e. Attribute Class or Permissible Attribute) where the Identifier, or in this case more likely, an Aspect token corresponds to the value Attributes.ObjectName

./MaturityLevels.where(!./@obsolete)

Filter the collection of Maturity Levels by excluding all items (i.e. Maturity Level) having Obsolete="true"

./MaturityLevels[20]

Get the item (i.e. Maturity Level or Permissible Maturity Level) wher the Identifier, an Aspect token, or (most likely in this case) the Sort Order corresponds to the value 20.

The Sort Order lookup is supported for Maturity Level collections only

./MaturityLevels.isNull()

A Boolean expression that resolves to true if the Class Library do not contain any Maturity Level definitions

$colums[‘name’].isNotNull()

A Boolean expression that will resolve to true if the variable columns contains a valid value list containing an item where the Identifier corresponds to the value name (see Variables)

./Extensions[‘myPrefix’]/@flag.isNull()

A Boolean expression that will resolve to true if the extension for current context do not contain a property with name flag

TitleResults for “How to create a CRG?”Also Available in