Skip to main content

system.kanoa.cmms.updateProcedureStepCheck(checkInfo, userId)

Updates an existing procedure step check � one of the individual verification items (a measurement, pass/fail check, or reading) attached to a procedure step. Call this from the procedure builder when a planner edits a check's name, description, sort order within the step, or its required/enabled flags. All keys in checkInfo are required, and the function overwrites the identified check's fields with the values supplied, recording userId for audit purposes.


Parameters

checkInfo Dictionary

- checkConfigString
- checkDescriptionString
- checkNameString
- enabledBoolean
- procedureStepCheckIdIntegerId of procedure step check
- procedureStepIdIntegerId of procedure step
- requiredBoolean
- sortOrderInteger

userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

checkInfo = {
"procedureStepCheckId": 8890,
"procedureStepId": 4021,
"checkName": "Belt deflection reading",
"checkDescription": "Record belt deflection in mm using the tension gauge.",
"checkConfig": "",
"sortOrder": 1,
"required": True,
"enabled": True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
result, message = system.kanoa.cmms.updateProcedureStepCheck(checkInfo, userId)
print result, message