system.kanoa.quality.config.updateChkShtTrigger(triggerInfo, userId)
Updates a check sheet trigger. All triggerInfo keys are required.
Parameters
triggerInfo Dictionary
| - chkShtId | Integer | |
| - chkShtTriggerId | Integer | |
| - comingDueMins | Integer | # of minutes after being triggered that a check sheet will be in 'Coming Due' state |
| - delayMins | Integer | # of minutes after triggered that a check sheet will be created. Used to prevent flooding of required checks after a shift change |
| - enabled | Boolean | |
| - graceMins | Integer | # of minutes a check sheet will remain in 'Over due' before becoming 'Missed' |
| - intervalMins | Integer | # of minutes between new checks sheets being triggered |
| - modeId | Integer | Can be None for all modes |
| - modifier | String | Can Be None |
| - overDueMins | Integer | # of minutes after 'Due' state before a check sheet will transtion to 'Over due' |
| - productionCount | Float | Can be None. For a count trigger (Infeed, Outfeed, Waste or General Count), a check is created every productionCount counts |
| - shiftNameId | Integer | Can be None for all shifts |
| - triggerTypeId | Integer | |
| - fromModeId | Integer | Mode Change only, optional: the mode the asset must be changing from. None for a change from any mode |
| - stateIds | List | State Change only, required: the states it fires on, as a list or a comma separated String |
| - minStateMins | Float | State Change only: minutes the asset must be in the state before a check is created. None is 0 |
| - counterName | String | General Count only, required: the name of the asset's general counter |
userId Integer: Id of user executing the function
Returns
# of records modified Integer
Example
triggerInfo = {
'chkShtTriggerId': 14,
'chkShtId': 4,
'triggerTypeId':2,
'modeId': None,
'shiftNameId': None,
'intervalMins': 10,
'delayMins': 5,
'productionCount': None,
'comingDueMins': 5,
'overDueMins': 5,
'graceMins': 10,
'enabled': True,
'modifier': None
}
userId = 5
retVal = system.kanoa.quality.config.updateChkShtTrigger(triggerInfo, userId)