Skip to main content

system.kanoa.performanceState.addPerformanceState

This function requires KanoaOPS module

Description

Returns performanceState info for given parameters

Syntax

addPerformanceState(performanceStateInfo, userId)
  • Parameters
      performanceStateInfo (dict)
      - performanceStateName (string)
      - performanceStateClassId (int)
      - performanceStateColor (int)
      - enabled (bool)
      userId (int)
  • Returns
    performanceStateId: int, msg (string): None if success
  • Code Example

    # Example Usage:
    userId = 18
    performanceStateInfo = {
    'performanceStateName': 'Not enough personnel',
    'performanceStateClassId': 1,
    'performanceStateColor': '#FFFFCC',
    'enabled': True,
    }
    system.kanoa.performanceState.addPerformanceState(performanceStateInfo, userId)
    >
    5, None
    >>>