Skip to main content
Version: V2 (Ignition 8.1)

system.mes.inventory.doesLotExist

Description​

Checks if an Inventory Lot with the given material and lot name exists in the system.

Syntax​

system.mes.inventory.doesLotExist(materialIdOrPath, lotName)

Parameters​

ParameterTypeNullableDescription
materialIdOrPathStringFalseThe ID or path of the material associated with the inventory lot.
lotNameStringFalseThe name of the inventory lot to search for.

Returns​

Returns True if an inventory lot with the given material and name exists, False otherwise.

Code Examples​

# Check if a lot with the given material and name exists
exists = system.mes.inventory.doesLotExist('Bottle/Milk', 'L2824L9CO')

if exists:
print('Lot exists')
else:
print('Lot does not exist')