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
# Example Usage:
state_info = {
'stateName': 'NewState',
'stateCategoryId': 1,
'stateTypeId': 1,
'assetGroupId': 1,
'enabled': True
}
user_id = 456
state_id = system.kanoa.asset.addState(state_info, user_id)