Skip to main content

system.kanoa.asset.addState(stateInfo, userId)

Adds a new state. All stateInfo keys are required


Parameters

stateInfo Dictionary

- assetGroupIdInteger
- enabledBoolean
- stateCategoryIdInteger
- stateColorStringi.e. '#FF0000'
- stateNameString
- stateTypeIdInteger

userId Integer: Id of user executing the function


Returns

stateId Integer


Example

stateInfo = {
'stateName': 'Blocked',
'stateColor': #00FF00',
'stateCategoryId': 1,
'stateTypeId': 1,
'assetGroupId': 1,
'enabled': True
}
userId = 456
stateId = system.kanoa.asset.addState(stateInfo, userId)