Skip to main content

system.kanoa.performanceState.addPerformanceState

Description

Returns performanceState info for given parameters

Syntax

addPerformanceState(performanceStateInfo, userId)

Parameters:
  • performanceStateInfo (dict)
  • userId (int)

  • Returns:
  • performanceStateId (int)
  • msg (string): None if success
  • Dictionary

    ParameterTypeRequiredNotes
    performanceStateNamestring
    performanceStateClassIdint
    performanceStateColorint
    enabledbool

    Code Examples

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