Skip to main content

system.kanoa.quality.config.addAttribute

This function requires KanoaQDS module

Description

Adds a new attribute in KanoaQDS.

Syntax

addAttribute(attrInfo, userId)
  • Parameters
      dict attrInfo - Dictionary, e.g., {'attributeName': 'some attribute name', 'attributeDescription': 'some description', 'parentId': 6, 'enabled': True}
      int userId - User ID
  • Returns
      int attributeId - ID of the newly added attribute.
  • 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}")