system.kanoa.schedule.getScheduleBlocks
Description
Returns all schedule blocks for the given parameters.Syntax
getScheduleBlocks(paramsDict)- paramsDict (dict)
- - assetId (int)
- - assetPath (string)
- - recurring (bool)
- - scheduleBlockId (int)
- - scheduleBlockIdList (list[int])
- - modeId (int)
- - modeName (string)
- - workOrderId (int)
- - workOrderName (string)
- - itemId (int)
- - itemName (string)
- - startDate (datetime)
- - endDate (datetime)
- scheduleBlocks (pyDataset) - Dataset containing schedule blocks based on the provided parameters.
Code Example
# Example Usage:
paramsDict = {'scheduleBlockId': 217}
print system.kanoa.utilities.convertDatasetRowToJSON(system.kanoa.schedule.getScheduleBlocks(paramsDict), 0)
> {
'modeName': u'Production',
'itemColor': u'#000000',
'notes': u'',
'color': u'#00FF00',
'scheduleBlockId': 217,
'scheduledQty': None,
'endDate': Mon Aug 14 00:30:00 UTC 2023,
'modeTypeId': 5,
'changedDate': None,
'itemName': u'Product A1',
'modeId': 2,
'assetId': 451,
'assetPath': None,
'changedBy': None,
'itemDescription': u'Nice buns',
'outfeedUnits': None,
'modeTypeName': u'Production',
'itemId': 45,
'modeColor': u'#00639a',
'createdDate': None,
'itemPath': u'FG\\WINE\\RED WINE\\Product A1',
'createdBy': None,
'rruleStr': u'FREQ=WEEKLY;INTERVAL=1;BYWEEKDAY=MO,TU,WE,TH,FR;UNTIL=20230816T020000',
'workOrderName': u'1234b',
'workOrderId': 1,
'scheduleBlockName': u'',
'startDate': Sun Aug 13 16:30:00 UTC 2023
}
>>>