Skip to main content

system.kanoa.quality.sheet.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 | None): None if success; error details on failure.
  • Parameters

    ParameterTypeRequiredNotes
    chkShtIdintYesID of the check sheet to update
    fieldstringYesMust be a valid column in qds.chkSht
    valuepyObjectYesBound as a query parameter; type should match the target column
    userIdintYesRecorded in changedBy; changedDate set to current time

    Code Examples

    # Update the 'enabled' flag to True
    records_modified, msg = system.kanoa.quality.sheet.updateSheetField(
    chkShtId=56,
    field='enabled',
    value=True,
    userId=123
    )

    print(records_modified, msg) # e.g., 1, None

    # Update the 'description'
    records_modified, msg = system.kanoa.quality.sheet.updateSheetField(
    chkShtId=56,
    field='description',
    value='Periodic safety checklist for Line A',
    userId=123
    )
    print(records_modified, msg)