Skip to main content

system.mes.location.getPropertyValue

Description

Retrieves a Location Property Value record directly by its ID.

Syntax

system.mes.location.getPropertyValue(id)

Parameters

ParameterTypeDescription
idStringThe ULID of the location property value to retrieve

Returns

Returns a JSON representation of the location property value. Returns nothing if no location property value is found.

NameTypeDescription
locationIdString (ULID)The ULID of the location.
propertyIdString (ULID)The ULID of the location property.
dataTypeStringThe data type of the property value. Must be the same as the data type of the property.
valueMixedThe value assigned to the property value if none is provided. The type is mixed as it depends on what dataType is.
idString (ULID)The ULID of the location property value.
notesStringNotes related to the location property value.
enabledBooleanIndicates if the property value is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Example

# Get a location property value by its ID
propertyValueId = "01KR72DNT8-FXJL6QAB-9YV53M2P"
propertyValue = system.mes.location.getPropertyValue(propertyValueId)

if propertyValue:
print("Property value: {0}".format(propertyValue['value']))
print("For location: {0}".format(propertyValue['locationId']))
print("For property: {0}".format(propertyValue['propertyId']))
else:
print("Property value not found")