GET_NUMBER_PROPERTY

Retrieve the value of a given property (by name) for a given instance of a model other than the current model. This function is intended for properties outside of this current model. If you intend on updating a property of your current model, use GET_NUMBER_RTDT_PROPERTY instead.

Usage

GET_NUMBER_PROPERTY(providerType, modelId, instanceId, propertyName)

Parameters

providerType

String

The type of provider (e.g ‘AzureDT’)

modelId

String

The full ID of the model

instanceId

String

The ID of the instance you are retrieving a property for

propertyName

String

The fully qualified name of the property (see remarks)

Returns

Number

Examples

GET_NUMBER_PROPERTY(‘AzureDT’, ‘dtmi:mycompany:mymodel;1’, ‘instance3’, ‘/namespace/Property1’)

12

Remarks

  1. This function only retrieves actual values when executed in a real deployment. In the test environment, it always returns 0.

  2. This function is intended for properties outside of this current model. When specifying the name of the property to retrieve, you will need the fully qualified name, using the component name. For instance, if the property you need to act on is in an Azure DT model whose component is named ‘myComponent’, then the property name will be ‘/myComponent/propertyName’