Skip to main content

system.kanoa.quality.config.addAttribute

Requires kanoaQDS license

Description

Adds a new attribute.

Syntax

addAttribute(attrInfo, userId)

Parameters:
  • attrInfo (dict): Dictionary containing attribute info
  • userId (int): User ID

  • Returns:
  • attributeId (int): ID of the newly added attribute
  • Dictionary

    ParameterTypeRequiredNotes
    attributeNamestringe.g. 'some attribute name'
    attributeDescriptionstringe.g. 'some description'
    parentIdinte.g. 6
    enabledboole.g. True

    Code Examples

    # Usage example
    attribute_info = {'attributeName': 'some attribute name', 'attributeDescription': 'some description', 'parentId': 6, 'enabled': True}
    new_attribute_id = system.kanoa.quality.config.addAttribute(attrInfo=attribute_info, userId=123)

    if new_attribute_id is not None:
    print(f"Successfully added attribute with ID: {new_attribute_id}")