system.kanoa.event.updateStateEventInfo
Description
Adds, inserts, or updates an entry in the stateEventInfo table. This can be used to hold metadata about any stateEvent. We use it to store whether a part was required for a downtime event.Syntax
updateStateEventInfo(stateEventId, stateEventInfoName, value, userId=None)- stateEventId - StateEvent ID.
- stateEventInfoName - Name of the stateEventInfo.
- value - Value to be updated or inserted.
- userId (optional) - User ID. Default is None.
stateEventInfoId (int) if value is deleted, else None.
Code Example
# Example Usage:
stateEventId = 123
stateEventInfoName = 'exampleInfo'
value = 'exampleValue'
userId = 999
stateEventInfoId = system.kanoa.event.updateStateEventInfo(stateEventId, stateEventInfoName, value, userId)