# system.kanoa.event.checkForDuplicateModeEvents(paramsDict, userId)

We should never have duplicate contiguous modeEvent entries that are the same mode, workorder, item, asset.
This function runs periodically and removes any duplicates

---
### Parameters
**paramsDict** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - assetId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - assetPath</td><td>String</td><td></td></tr>	
 	<tr><td> - endDate</td><td>DateTime</td><td></td></tr>	
 	<tr><td> - startDate</td><td>DateTime</td><td></td></tr>	
	</tbody>
</table>

**userId** `Integer`: Id of user executing the function<br />

---
### Returns
**# of records modified** `Integer`<br />

---
### Example
```python
userId = 5
startDate = system.date.parse("2025-01-01 00:00:00")
endDate = system.date.parse("2025-01-07 00:00:00")
retVal = system.kanoa.event.checkForDuplicateModeEvents({'assetId': 5, 'startDate': startDate, 'endDate': endDate}, userId)
```
