system.kanoa.quality.config.sheets.updateSheetType
Description
Updates an existing check sheet type record in the database.Syntax
updateSheetType(shtTypeInfo, userId)Parameters:
– shtTypeInfo (dictionary): Dictionary containing sheet type information.
– userId (int): User ID performing the update.
Returns:
– chkShtTypeId (int): ID of the updated sheet type.
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
chkShtTypeId | int | Yes | ID of the check sheet type to update |
chkShtTypeName | string | Yes | Name of the check sheet type |
parentId | int | No | ID of the parent sheet type (if applicable) |
description | string | No | Description of the sheet type |
enabled | bool | No | True to enable the sheet type, False to disable it |
Code Examples
# Update an existing sheet type
shtTypeInfo = {
"chkShtTypeId": 4,
"chkShtTypeName": "Quality",
"parentId": 1,
"description": "Quality check sheets for production lines",
"enabled": True
}
recordsModified = system.kanoa.quality.config.sheets.updateSheetType(
shtTypeInfo=shtTypeInfo,
userId=123
)
print(recordsModified)
# Disable a sheet type
shtTypeInfo = {
"chkShtTypeId": 5,
"chkShtTypeName": "Maintenance",
"parentId": None,
"description": None,
"enabled": False
}
recordsModified = system.kanoa.quality.config.sheets.updateSheetType(shtTypeInfo, 123)
print(recordsModified)