system.kanoa.cmms.updateWorkOrderConditionField(workOrderConditionId, field, value, userId)
Updates a single field on an existing work order condition, identified by workOrderConditionId, to the passed value.
This is a targeted single-field update (as opposed to setWorkOrderCondition, which writes the full condition record) �
useful for tasks like recording that a threshold was just crossed or bumping a counter value without resupplying the entire condition dictionary.
Parameters
workOrderConditionId Integer: Id of workOrderConditionId to update
field String: Valid options are conditionId, lastGeneratedDate, lastGeneratedCount, conditionInfo
value String: Value to update to
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
workOrderConditionId = 305
field = "lastGeneratedCount"
value = 142.7
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.cmms.updateWorkOrderConditionField(workOrderConditionId, field, value, userId)
print recordsModified, message