Skip to main content

system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial

Description

Finds Inventory Lot IDs matching the specified location, material, and date range criteria.

Syntax

system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial(locationIdOrPath, materialIdOrPath, startDate, endDate)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringTrueThe ID or path of the location to filter by.
materialIdOrPathStringTrueThe ID or path of the material to filter by.
startDateDateTrueThe start date of the date range. Only lots active after this date are included.
endDateDateTrueThe end date of the date range. Only lots active before this date are included.

Returns

Returns an array of lot ID strings matching the specified criteria.

Code Examples

from java.util import Date

# Find lot IDs for a specific location and material within a date range
lotIds = system.mes.inventory.findLotIdsByLocationDateRangeAndMaterial(
locationIdOrPath='DairyCo/Plant1',
materialIdOrPath='Bottle/Milk',
startDate=None,
endDate=None
)

# Output the list of lot IDs
for lotId in lotIds:
print(lotId)