Skip to main content

system.mes.productionOrder.newProductionOrderProperty

Description

Generates an empty non-persisted Production Order Properties object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveProductionOrderProperty method in order to persist the record.

Syntax

system.mes.productionOrder.newProductionOrderProperty()

Parameters

ParameterTypeDescription
None-This method does not take any parameters.

Returns

Returns a JSON representation of the newly created production order property object. The following is a list of keys and default values:

KeyDefault Value
namenull
descriptionnull
dataTypeString
lowLimitnull
highLimitnull
formatnull
unitOfMeasureIdnull
unitOfMeasureNamenull
unitOfMeasureSymbolnull
optionsnull
nullablefalse
defaultValuenull
idnull
notesnull
enabledtrue
spare1null
spare2null
spare3null

Code Examples

# Generate the object structure for a new production order property object with no initial arguments
production_order_property = system.mes.productionOrder.newProductionOrderProperty()

# Define production order property details
production_order_property['name'] = 'Batch Size'
production_order_property['description'] = 'Batch size property'
# (You can continue setting other properties as needed here)

# Save the production order property
saved_property = system.mes.productionOrder.saveProductionOrderProperty(**production_order_property)

# Output the JSON representation of the saved production order property
print(saved_property)