Skip to main content

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

- assetIdInteger
- assetReqdBoolean
- chkShtIdInteger
- chkShtTypeIdInteger
- chkShtVersionGroupIdIntegerEvery version of one check sheet; stable across releases
- chkShtVersionStateNameString
- chkShtVersionStateNameListList of Strings
- enabledBoolean
- includeNullAssetsBoolean
- itemIdInteger
- masterOnlyBoolean
- modeIdInteger
- shiftNameIdInteger
- toolingIdInteger
- triggerTypeIdInteger

Returns​

data pyDataset. Its last column is chkShtVersionGroupId.


Example​

paramsDict = {'enabled': True, 'triggerTypeId': 1}
sheetsData = system.kanoa.quality.sheet.getSheetsFilteredBy(paramsDict)