system.kanoa.asset.addState
Description
Add a state to the state table.Syntax
addState(stateInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
stateName | string | ||
stateColor | None | ||
stateCategoryId | int | ||
stateTypeId | int | ||
assetGroupId | None | ||
enabled | bool |
Code Examples
stateInfo = {
'stateName': 'NewState',
'stateColor': #00FF00',
'stateCategoryId': 1,
'stateTypeId': 1,
'assetGroupId': 1,
'enabled': True
}
userId = 456
stateId = system.kanoa.asset.addState(stateInfo, userId)