Skip to main content
Version: V3 (Ignition 8.3)

system.mes.inventory.checkLocationHasCapacity

Description​

Checks if the Locations record can store the given quantity of material.

NOTE: If an inventory lot ID is provided, the material ID parameter becomes optional (cannot be None or left as null). This can be left as an empty string.

Permissions​

This method does not require any permissions.

Syntax​

system.mes.inventory.checkLocationHasCapacity(locationIdOrPath, lotIdOrName, materialIdOrPath, quantity)

Parameters​

ParameterTypeNullableDescription
locationIdOrPathStringFalseThe ID or path of the location associated with the inventory.
lotIdOrNameStringFalseThe ID or name of the inventory lot associated with the inventory.
materialIdOrPathStringFalseThe ID or path of the material associated with the inventory's lot.
quantityDoubleFalseThe quantity of inventory to store.

Returns​

Returns a boolean indicating whether the location can accommodate the given quantity of inventory.

Code Examples​

# Check whether the location can store the given quantity of inventory
hasCapacity = system.mes.inventory.checkLocationHasCapacity('DairyCo', '425e29ed-2780-430a-95cf-79431ec0e3e5', 'Bottle/Milk', 1454)

# Output the boolean result
print(hasCapacity)