Skip to main content

system.kanoa.attribute.updateAttribute

Description

Updates an existing attribute.

Syntax

updateAttribute(attrInfo, userId)

Parameters:
  • attrInfo (dict)
  • userId (int) - User ID

  • Returns:
  • (int) - Number of records modified
  • Dictionary

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

    Code Examples

    # Example usage
    attrInfo = {
    'attributeId': 1,
    'attributeName': 'some attribute name',
    'attributeDescription': 'some description',
    'parentId': 6,
    'enabled': True
    }
    userId = 123
    modifiedRecords = system.kanoa.attribute.updateAttribute(attrInfo, userId)
    print(modifiedRecords) # Print the number of modified records