# system.kanoa.asset.updateStateField(stateId, field, value, userId)

Updates the passed field value for the given stateId. If the field is enabled, we will also update the assetLink table enabled bit

---
### Parameters
**stateId** `Integer`: Id of the state to update<br />
**field** `String`: name of the field to update. Valid options are stateName, stateColor, stateCategoryId, stateTypeId, assetGroupId, enabled<br />
**value** `pyObject`: Value to update to<br />
**userId** `Integer`: Id of user executing the function<br />

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

---
### Example
```python
stateId = 45
field = 'stateName'
value = 'Really Blocked'
userId = 5
modifiedRecords = system.kanoa.asset.updateStateField(stateId, field, value, userId)
```
