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
| - assetPath | String | |
| - assetPathList | List | |
| - auto | Boolean | Filter check sheets by auto or manual |
| - chkShtStateId | Integer | |
| - chkShtStateName | String | |
| - chkShtTypeId | Integer | |
| - chkShtVersionGroupId | Integer | Every version of one check sheet; stable across releases |
| - chkShtVersionStateId | Integer | |
| - chkShtVersionStateName | String | |
| - enabled | Boolean | |
| - includeNullAssets | Boolean | |
| - masterOnly | Boolean | |
| - path | String |
Returns
data pyDataset
Example
paramsDict = {'enabled': True, 'assetPathList': ['ABC Box Co', 'Glue Factory']}
chkShtData = system.kanoa.quality.sheet.getSheetsByAsset(paramsDict)