system.kanoa.quality.event.getChkItemStateId
Description
Given the check item info and value, this function returns if the check item is passing, failing, or warning in KanoaQDS.Syntax
getChkItemStateId(chkItemInfo, value)- chkItemInfo - Dictionary containing information about the check item (dictionary).
- value - Value of the check item (int/float/string).
- chkItemStateId - ID of the check item state (int).
- message - Additional message (string).
Code Example
# Usage example
chk_item_info = {'chkItemEventId': 1, 'chkShtEventId': 3, 'chkItemId': 1, 'measNumber': 1, 'chkItemValue': 'sausages', 'chkItemStateId': 2}
value = 10.5
chk_item_state_id, message = system.kanoa.quality.event.getChkItemStateId(chkItemInfo=chk_item_info, value=value)
print(chk_item_state_id, message)