Skip to main content

system.kanoa.performanceState.addPerformanceState(performanceStateInfo, userId)

Adds a new performance state. All performanceStateInfo keys are required.


Parameters

performanceStateInfo Dictionary

- enabledBoolean
- performanceStateClassIdInteger
- performanceStateColorString
- performanceStateNameString

userId Integer: Id of user executing the function


Returns

performanceStateId Integer
msg String None if success


Example

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