Skip to main content

system.kanoa.quality.config.updateTolerance

This function requires KanoaQDS module

Description

Updates an attribute tolerance in KanoaQDS.

Syntax

updateTolerance(attrInfo, userId)
  • Parameters
      dict attrInfo - Dictionary, e.g., {'attributeToleranceId': 1, 'attributeId': 2, 'assetId': None, 'itemId': None, 'itemClassId': None, 'itemSetId': None, 'uel': 10.0, 'udl': None, 'usl': 9.0, 'ucl': 8.0, 'tgt': 5, 'lcl': 3, 'lsl': 2, 'ldl': None, 'lel': 0, 'enabled': True}
      int userId - User ID
  • Returns
      int modifiedRecords - Number of records modified during the update.
  • Code Examples

    # Usage example
    tolerance_info = {'attributeToleranceId': 1, 'attributeId': 2, 'assetId': None, 'itemId': None, 'itemClassId': None, 'itemSetId': None, 'uel': 10.0, 'udl': None, 'usl': 9.0, 'ucl': 8.0, 'tgt': 5, 'lcl': 3, 'lsl': 2, 'ldl': None, 'lel': 0, 'enabled': True}
    modified_records = system.kanoa.quality.config.updateTolerance(attrInfo=tolerance_info, userId=123)

    if modified_records is not None:
    print(f"Successfully updated {modified_records} records")