# system.kanoa.event.addModeEvent(assetId, field, value, tStamp, modeSourceId, userId)

Adds a new modeEvent record with a single value to the specified mode event table column such as modeCode, workOrderId, or itemId fields
This function updates a single field to support tag change events where the mode might, change then the itemName, then the work order

---
### Parameters
**assetId** `Integer`: Id of asset<br />
**field** `String`: i.e Column to change<br />
**value** `pyObject`: Valid to update to<br />
**tStamp** `DateTime`: Time stamp of mode event<br />
**modeSourceId** `Integer`: Whether this is coming from the schedule, operator or plc (tag change)<br />
**userId** `Integer`: Id of user executing the function<br />

---
### Returns
**modeEventId** `Integer`<br />
**message** `String` None if success<br />

---
### Example
```python
assetId = 123
field = 'modeCode'
value = 1
tStamp = system.date.now()
modeSourceId = 1
userId = 123
modeEventId, msg = system.kanoa.event.addModeEvent(assetId, field, value, tStamp, modeSourceId, userId)
```
