system.kanoa.asset.updateStateCategory
Description
Updates a stateCategory in KanoaOPS. Constraints will prevent duplicate state categories from being created.Syntax
updateStateCategory(stateCategoryInfo, userId)- dict stateCategoryInfo - Dictionary {'stateCategoryId': 18, 'stateCategoryName': 'sausages', 'enabled': True}
- int userId - The ID of the user making the update.
- (bool) Success flag
- (str) Records updated or error message
Code Examples
# Usage example
success_flag, message = system.kanoa.asset.updateStateCategory(stateCategoryInfo={'stateCategoryId': 18, 'stateCategoryName': 'sausages', 'enabled': True}, userId=456)
if not success_flag:
print(f"Update failed: {message}")
else:
print(f"Successfully updated stateCategory.")