Skip to main content

system.kanoa.quality.sheet.updateSheetType

This function requires KanoaQDS module

Description

Updates the sheetType associated with a check sheet. Think of a sheet type essentially as a folder where checks sheets of different types can be stored. Initially implemented as a type field, it has now become the parentId of the check sheet allowing types to be nested.

Syntax

updateSheetType(shtTypeInfo, userId)
  • Parameters
      shtTypeInfo - Dictionary containing sheet type information:
      - 'chkShtTypeId': ID of the sheet type to update (int).
      - 'chkShtTypeName': Name of the sheet type (string).
      - 'parentId': ID of the parent sheet type (int).
      - 'description': Description of the sheet type (string, optional).
      - 'enabled': True to enable the sheet type (bool).
      userId - User ID (int).
  • Returns
      chkShtTypeId - ID of the updated sheet type (int).
  • Code Example

    # Usage example
    sht_type_info = {'chkShtTypeId': 4, 'chkShtTypeName': 'Quality', 'parentId': 1, 'description': None, 'enabled': True}
    user_id = 123
    chk_sht_type_id = system.kanoa.quality.sheet.updateSheetType(shtTypeInfo=sht_type_info, userId=user_id)

    print(chk_sht_type_id)