Skip to main content

system.kanoa.quality.config.addCheck

Requires kanoaQDS license

Description

Adds a check item to a check sheet.

Syntax

addCheck(chkItemInfo, userId)

Parameters:
  • chkItemInfo (dict): Dictionary of check item info
  • userId (int): User ID

  • Returns:
  • chkItemId (int): ID of the added check item
  • Dictionary

    ParameterTypeRequiredNotes
    chkItemGroupIdinte.g. 1
    chkShtIdinte.g. 2
    dataTypeIdinte.g. 3
    engUnitIdNone
    chkItemNamestringe.g. 'Check 1'
    chkItemTypeIdinte.g. 1
    chkItemTriggerIdinte.g. 4
    measCountinte.g. 1
    instructionsNone
    pickListIdinte.g. 4
    pickListValuesNone
    calculationNone
    requiredbool
    enabledbool
    dynamicbool
    sortOrderinte.g. 0
    formatstringe.g. '#,##0.#'
    attributeIdNone

    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.")