Skip to main content

system.kanoa.attribute.addAttribute(attrInfo, userId)

Adds a new attribute. If this attribute already exists it will return the existing attributeId


Parameters

attrInfo Dictionary

- attributeDescriptionString
- attributeNameString
- enabledBoolean
- parentIdInteger

userId Integer: Id of user executing the function


Returns

attributeId Integer


Example

attrInfo = {
'attributeName': 'some attribute name',
'attributeDescription': 'some description',
'parentId': 6,
'enabled': True
}
userId = 123
attributeId = system.kanoa.attribute.addAttribute(attrInfo, userId)