Skip to main content

system.kanoa.quality.config.addDataType

This function requires KanoaQDS module

Description

Adds a new data type in KanoaQDS.

Syntax

addDataType(dataTypeInfo, userId)
  • Parameters
      dict dataTypeInfo - Dictionary, e.g., {'dataTypeName': 'Special Bool', 'enabled': True,'isNumeric': True,'pickListEnabled':True}
      int userId - User ID
  • Returns
      int dataTypeId - ID of the newly added data type.
  • 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.")