New AQL Function: V2C

New AQL Function: V2C

V2C

V2C converts a list of point values to a list of constants

Every AQL data point as an asset, a property and a value. The V2C function takes the value out of those points and turns it into a list of constants. 

This is often used when you have property values that contain the names of other assets that you want to query.

Example

Let's imagine that you have a number of different power distribution boards around your site, named DB1, DB2, DB3 etc. Each of these boards has a Power Use property. You've also got a smart machine - the Boggler - that knows the ID of the distribution board its been plugged into, which appears in ARDI as the Distribution Board property.

If we want to determine how much power the Boggler is using, we first need to find the name of the distribution board.
'Boggler' ASSET 'Distribution Board' PROPERTY VALUES
RESULT: [DATA POINT: Boggler Distribution Board = 'DB2']

This gets us the name of the distribution board - for example, DB2.

But right now the result is a data point. If we want to find out the power usage on distribution board two, we're going to need an asset. This is where we can use the V2C function.

'Boggler' ASSET 'Distribution Board' PROPERTY VALUES V2C ASSET 'Power Usage' PROPERTY VALUES
RESULT: [DATA POINT: Distribution Board DB2 Power Usage = '5.72A']

V2C takes the values we found and converts it into a constant list. It effectively turns our final query into ('DB2') ASSET 'Power Usage' PROPERTY VALUES

This way, we can follow single, or even complex chains of named assets in a single AQL query.