Skip to main content

system.kanoa.asset.updateStateCategory

This function requires KanoaOPS module

Description

Updates a stateCategory in KanoaOPS. Constraints will prevent duplicate state categories from being created.

Syntax

updateStateCategory(stateCategoryInfo, userId)
  • Parameters
      dict stateCategoryInfo - Dictionary {'stateCategoryId': 18, 'stateCategoryName': 'sausages', 'enabled': True}
      int userId - The ID of the user making the update.
  • Returns
      (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.")