Skip to main content

system.kanoa.quality.config.addCheck(chkItemInfo, userId)

Add configuration for a check item. All chkItemInfo keys are required.


Parameters

chkItemInfo Dictionary

- attributeIdIntegerlinks to an attribute for data source value capture and/or tolerance checking for pass/fail
- calculationString
- chkItemGroupIdInteger
- chkShtIdInteger
- chkItemNameString
- chkItemTriggerIdInteger
- chkItemTypeIdInteger
- chkShtIdInteger
- dataTypeIdInteger
- dynamicBooleanIf true, this check will only be displayed if we find a tolerance set for it based on asset and item
- enabledBoolean
- engUnitIdInteger
- formatStringi.e. '#,##0.#'
- instructionsString
- measAggregateString
- measCountInteger
- persistenceBooleanIf true, this check value will be set to the value taken for the previous check. It can be modified by the check taker
- pickListIdInteger
- pickListValuesString
- requiredBoolean
- sortOrderInteger
- specificationString

userId Integer


Returns

chkItemId Integer


Example

chkItemInfo = {
'chkItemGroupId': 1,
'chkShtId': 2,
'dataTypeId':3,
'engUnitId':None,
'chkItemName': 'Check 1',
'chkItemTypeId':1,
'chkItemTriggerId':4,
'measCount': 1,
'measAggregate': None,
'instructions': None,
'pickListId': 4,
'pickListValues': None,
'calculation': None,
'required': True,
'enabled': True,
'dynamic': False,
'sortOrder':0,
'format': '#,##0.#',
'attributeId': None,
'specification': None,
'persistence': None
}
userId = 5
chkItemId = system.kanoa.quality.config.addCheck(chkItemInfo, userId)