Skip to main content

system.mes.oee.splitOeeModeRecord

Description

Splits an existing Oee Mode record at a specified time. This action modifies the original record, shortening its duration, and creates a new record for the remaining time.

Permissions

This method requires the OEE.WRITE.SAVE permission.

Syntax

system.mes.oee.splitOeeModeRecord(oeeModeRecordId, splitDate)

Parameters

ParameterTypeNullableDescription
oeeModeRecordIdString (ULID)FalseThe ID of the oee mode record to update.
splitDateDateFalseThe date and time to split the record at.

Returns

Returns a JSON representation of the new OeeModeRecordDTO object created after the split.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Mode Recordnull
locationIdStringFalseIdentifier of the associated location where this mode was recordednull
locationNameStringTrueName of the associated locationnull
locationPathStringTruePath of the associated location where this mode was recordednull
codeIntegerFalseInteger mode numbernull
statusStatusFalseStatus of the OEE production record (running, faulted, cancelled, complete etc.)UNKNOWN
startDateInstantFalseStart date and time of the mode recordInstant.now()
endDateInstantTrueEnd date and time of the mode recordnull
durationDoubleFalseTotal duration of the mode record in seconds0.0
overrunDurationSecDoubleFalseDuration in seconds that the machine has overrun its scheduled downtime0.0
nameStringFalseName of the modenull
calculationTypeOeeModeCalculationTypeFalseSpecifies how this mode should be factored into OEE calculationsSCHEDULED_PRODUCTION
colorStringFalseHex color code representing the mode visually"#000000"
expectedDurationDoubleTrueExpected duration of the mode in seconds0.0
notesStringTrueNotes associated with the OEE Mode Recordnull
enabledbooleanTrueIndicates whether the OEE Mode Record is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

oeeModeRecordId = "01K4OEEMRC-UNIT1-0001"  

splitDate = "2025-09-05 14:58:30"
splitDate = system.date.parse(splitDate, "yyyy-MM-dd HH:mm:ss")

newRecord = system.mes.oee.splitOeeModeRecord(oeeModeRecordId, splitDate)
print(newRecord)