Skip to main content

system.kanoa.quality.config.sheets.updateSheetField

Requires kanoaQDS license

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

ParameterTypeRequiredNotes
chkShtIdintYesID of the check sheet to update
fieldstringYesName of the column to update. Must be a valid column in qds.chkSht
valuepyObjectYesValue to assign to the field; data type should match the column definition
userIdintYesUser 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)