Skip to main content

system.mes.unitOfMeasure.getUnitOfMeasure

Description

Retrieves a Units Of Measure record by its ID or name.

Syntax

system.mes.unitOfMeasure.getUnitOfMeasure(idOrName)

Parameters

ParameterTypeDescription
idOrNameStringThe ID or name of the unit of measure to retrieve.

Returns

Returns a JSON representation of the unit of measure. Returns nothing if no unit of measure is found.

NameTypeDescription
nameStringThe name of the unit of measure.
symbolStringThe symbol of the unit of measure.
idString (ULID)The ULID of the unit of measure.
notesStringNotes related to the unit of measure.
enabledBooleanIndicates if the unit of measure is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve a unit of measure by ID or name
uom = system.mes.unitOfMeasure.getUnitOfMeasure('Pound')

# Output the unit of measure
print(uom)