Skip to main content

system.kanoa.quality.sheet.getSheetsByAsset(paramsDict)

Returns all check sheets linked to assets that meet the passed criteria. This function only returns unique records for a check sheet.

Store chkShtVersionGroupId, not the Master ID

A check sheet's masterChkShtId moves to the newly released version each time a revision is released, so a view or dashboard that stores it stops matching after the next release. Store chkShtVersionGroupId instead: every version of a check sheet shares it, and it never changes. To get the current master from it:

released = system.kanoa.quality.sheet.getSheets({'chkShtVersionGroupId': groupId, 'chkShtVersionStateName': 'Released'})
masterChkShtId = released.getValueAt(0, 'masterChkShtId') if released.rowCount else None

Parameters​

paramsDict Dictionary

- assetPathString
- assetPathListList
- autoBooleanFilter check sheets by auto or manual
- chkShtStateIdInteger
- chkShtStateNameString
- chkShtTypeIdInteger
- chkShtVersionGroupIdIntegerEvery version of one check sheet; stable across releases
- chkShtVersionStateIdInteger
- chkShtVersionStateNameString
- enabledBoolean
- includeNullAssetsBoolean
- masterOnlyBoolean
- pathString

Returns​

data pyDataset


Example​

paramsDict = {'enabled': True, 'assetPathList': ['ABC Box Co', 'Glue Factory']}
chkShtData = system.kanoa.quality.sheet.getSheetsByAsset(paramsDict)