Skip to main content

system.kanoa.quality.config.addCheck

This function requires KanoaQDS module

Description

Adds a check item to a check sheet in KanoaQDS.

Syntax

addCheck(chkItemInfo, userId)
  • Parameters
      dict chkItemInfo - Dictionary, e.g., {'chkItemGroupId': 1,'chkShtId': 2,'dataTypeId':3,'engUnitId':None,'chkItemName': 'Check 1','chkItemTypeId':1,'chkItemTriggerId':4,'measCount': 1,'instructions': None,'pickListId': 4,'pickListValues': None,'calculation': None,'required': True,'enabled': True, 'dynamic': False,'sortOrder':0,'format': '#,##0.#', 'attributeId': None}
      int userId - User ID
  • Returns
      int chkItemId - ID of the added check item.
  • Code Examples

    # Usage example
    chk_item_info = {'chkItemGroupId': 1,'chkShtId': 2,'dataTypeId':3,'engUnitId':None,'chkItemName': 'Check 1','chkItemTypeId':1,'chkItemTriggerId':4,'measCount': 1,'instructions': None,'pickListId': 4,'pickListValues': None,'calculation': None,'required': True,'enabled': True, 'dynamic': False,'sortOrder':0,'format': '#,##0.#', 'attributeId': None}
    added_chk_item_id = system.kanoa.quality.config.addCheck(chkItemInfo=chk_item_info, userId=123)

    if added_chk_item_id:
    print(f"Successfully added check item with ID {added_chk_item_id}")
    else:
    print("Addition failed.")