Skip to main content
Version: V2 (Ignition 8.1)

system.mes.productionOrder.setPropertyValue

Description

Updates the value of a Production Order Property Values record given a production order ID or name and a property ID or name.

Permissions

This method requires the PRODUCTION_ORDER.WRITE.SAVE permission.

Syntax

system.mes.productionOrder.setPropertyValue(productionOrderIdOrName, propertyIdOrName, value)

Parameters

ParameterTypeNullableDescription
productionOrderIdOrNameStringFalseThe ULID or name of the production order.
propertyIdOrNameStringFalseThe ULID or name of the property for which the value is retrieved.
valueMixedTrueThe value assigned to the property. The type is mixed as it depends on the data type of the property. May be None to clear the value, but only when the property definition is nullable; passing None for a non-nullable property raises an error.

Returns

Returns a JSON representation of the updated production order property value.

Code Examples

# Update the value of a production order property value
updatedPropertyValue = system.mes.productionOrder.setPropertyValue('01JPMTA7K3-E8EHA4MD-7C304P4Z', 'Batch Size', 200)

# Output the JSON representation of the updated production order property value
print(updatedPropertyValue)

# Clear the value of a nullable property by passing None
system.mes.productionOrder.setPropertyValue('01JPMTA7K3-E8EHA4MD-7C304P4Z', 'OrderStartForScheduling', None)