system.kanoa.quality.config.addCheck
Description
Adds a check item to a check sheet.Syntax
addCheck(chkItemInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
chkItemGroupId | int | e.g. 1 | |
chkShtId | int | e.g. 2 | |
dataTypeId | int | e.g. 3 | |
engUnitId | None | ||
chkItemName | string | e.g. 'Check 1' | |
chkItemTypeId | int | e.g. 1 | |
chkItemTriggerId | int | e.g. 4 | |
measCount | int | e.g. 1 | |
instructions | None | ||
pickListId | int | e.g. 4 | |
pickListValues | None | ||
calculation | None | ||
required | bool | ||
enabled | bool | ||
dynamic | bool | ||
sortOrder | int | e.g. 0 | |
format | string | e.g. '#,##0.#' | |
attributeId | None |
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.")