Skip to main content

system.kanoa.quality.event.getChkItemStateId

Requires kanoaQDS license

Description

Given the check item info and value, this function returns if the check item is passing, failing, or warning.

Syntax

getChkItemStateId(chkItemInfo, value)

Parameters:
  • chkItemInfo (dictionary): Dictionary containing information about the check item.
  • value (int/float/string): Value of the check item.

  • Returns:
  • chkItemStateId (int): ID of the check item state.
  • message (string): Additional message.
  • Code Examples

    # 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)