system.kanoa.quality.config.sheets.updateSheetField
Description
Updates a single field on an existing check sheet.Syntax
updateSheetField(chkShtId, field, value, userId)Parameters:
– chkShtId (int): Check sheet ID.
– field (string): Column name to update.
– value (pyObject): New value for the column.
– userId (int): User ID performing the update.
Returns:
– recordsModified (int): Number of records modified.
– message (string or None): None if success; error details on failure.
Parameters
Parameter | Type | Required | Notes |
---|---|---|---|
chkShtId | int | Yes | ID of the check sheet to update |
field | string | Yes | Name of the column to update. Must be a valid column in qds.chkSht |
value | pyObject | Yes | Value to assign to the field; data type should match the column definition |
userId | int | Yes | User performing the update. Automatically populates changedBy and changedDate |
Code Examples
# Update the 'enabled' flag
recordsModified, msg = system.kanoa.quality.config.sheets.updateSheetField(
chkShtId=56,
field='enabled',
value=True,
userId=123
)
print(recordsModified, msg) # e.g., 1, None
# Update the 'description' field
recordsModified, msg = system.kanoa.quality.config.sheets.updateSheetField(
chkShtId=56,
field='description',
value='Updated to reflect new QC process',
userId=123
)
print(recordsModified, msg)