Skip to main content

system.kanoa.quality.config.addDataType

Requires kanoaQDS license

Description

Adds a new data type.

Syntax

addDataType(dataTypeInfo, userId)

Parameters:
  • dataTypeInfo (dict): Dictionary containing data type information
  • userId (int): User ID

  • Returns:
  • dataTypeId (int): ID of the newly added data type
  • Dictionary

    ParameterTypeRequiredNotes
    dataTypeNamestringe.g. 'Special Bool'
    enabledbool
    isNumericbool
    pickListEnabledbool

    Code Examples

    # Usage example
    data_type_info = {'dataTypeName': 'Special Bool', 'enabled': True,'isNumeric': True,'pickListEnabled':True}
    user_id = 123
    data_type_id = system.kanoa.quality.config.addDataType(dataTypeInfo=data_type_info, userId=user_id)

    if data_type_id:
    print(f"Successfully added data type. New ID: {data_type_id}")
    else:
    print("Addition failed.")