system.mes.equipment.newEquipmentPropertyValue
Description
Generates an empty non-persisted Equipment Property Values object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveEquipmentPropertyValue method in order to persist the record.
Permissions
This method does not require any permissions.
Syntax
system.mes.equipment.newEquipmentPropertyValue()
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
| None | - | - | This method does not take any parameters. |
Returns
Returns a JSON representation of the newly created equipment property value object. The following is a list of keys and default values:
| Key | Default Value |
|---|---|
equipmentId | null |
equipmentPropertyId | null |
dataType | String |
value | null |
id | null |
notes | null |
enabled | true |
spare1 | null |
spare2 | null |
spare3 | null |
Code Examples
newValue = system.mes.equipment.newEquipmentPropertyValue()
newValue['equipmentId'] = system.mes.equipment.getEquipment('Pumps/CentrifugalPumps/Pump-101')['id']
newValue['equipmentPropertyId'] = system.mes.equipment.getEquipmentProperty('MaxFlowRate')['id']
newValue['value'] = 250.0
savedValue = system.mes.equipment.saveEquipmentPropertyValue(**newValue)
print(savedValue)