system.kanoa.quality.sheet.getSheetsFilteredBy(paramsDict)
Returns all check sheets that meet the passed criteria. This function may return duplicate records for a checksheet as each will be specific for the trigger, asset and item.
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
| - assetId | Integer | |
| - assetReqd | Boolean | |
| - chkShtId | Integer | |
| - chkShtTypeId | Integer | |
| - chkShtVersionGroupId | Integer | Every version of one check sheet; stable across releases |
| - chkShtVersionStateName | String | |
| - chkShtVersionStateNameList | List of Strings | |
| - enabled | Boolean | |
| - includeNullAssets | Boolean | |
| - itemId | Integer | |
| - masterOnly | Boolean | |
| - modeId | Integer | |
| - shiftNameId | Integer | |
| - toolingId | Integer | |
| - triggerTypeId | Integer |
Returns
data pyDataset. Its last column is chkShtVersionGroupId.
Example
paramsDict = {'enabled': True, 'triggerTypeId': 1}
sheetsData = system.kanoa.quality.sheet.getSheetsFilteredBy(paramsDict)