system.kanoa.schedule.getScheduleBlocks
Description
Returns all schedule blocks for the given parameters.Syntax
getScheduleBlocks(paramsDict)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
assetId | int | ID of the asset | |
assetPath | string | Path of the asset | |
recurring | bool | Whether the schedule block is recurring | |
scheduleBlockId | int | ID of the schedule block | |
scheduleBlockIdList | list[int] | List of schedule block IDs | |
modeId | int | ID of the mode | |
modeName | string | Name of the mode | |
workOrderId | int | ID of the work order | |
workOrderName | string | Name of the work order | |
itemId | int | ID of the item | |
itemName | string | Name of the item | |
startDate | datetime | Start date of the schedule range | |
endDate | datetime | End date of the schedule range |
Code Examples
# 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
}
>>>