Database Management
Reference Manual
Attributes
:
Query Attributes
: Query Arrays
Query Arrays
If the attribute is an array, the query will return a list of values. Individual elements can be queried by passing in the index number.
!VALUE = !!CE.DESP[2]
!VALUE = DESP[2]
Alternatively, the NUM keyword can be used for PML 1 syntax. A range of values can be returned using the TO keyword.
VAR !VALUE DESP NUM 3 - to retrieve the 3
rd
value
VAR !VALUE DESP NUM 3 TO 5 - to retrieve 3
rd
to 5
th
values
Q DESP NUM 3 TO 5
An error will occur if attempting to query off the end of the array.
Within a PML1 expression, a position attribute may be queried as an array in order to access the individual coordinates.
VAR !X (POS[1] ) - This will return the X coordinate.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.