# system.kanoa.cmms.addProcedureStepCheck(checkInfo, userId)

Adds a check to an existing procedure step identified by `procedureStepId`. 
Checks represent discrete verification points within a step (e.g. a measurement to record, a pass/fail inspection, or a value to confirm) that a technician must address while performing that step. 
As with procedure steps, `sortOrder` controls the order in which checks are presented within the step, and `required` marks whether the check must be satisfied before the step can be marked complete.

All checkInfo keys are required.

checkConfig is a complex dictionary object containing additional check information stored in the database as a string.

---
### Parameters
**checkInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - checkConfig</td><td>String</td>Can be None<td></td></tr>	
 	<tr><td> - checkDescription</td><td>String</td><td></td></tr>	
 	<tr><td> - checkName</td><td>String</td><td></td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - procedureStepId</td><td>Integer</td><td>Id of procedure step</td></tr>	
 	<tr><td> - required</td><td>Boolean</td><td></td></tr>	
 	<tr><td> - sortOrder</td><td>Integer</td><td></td></tr>	
	</tbody>
</table>

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

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

---
### Example
```python

checkConfig = {
					'dataTypeId': '5', 
					'engUnitId': None, 
					'specInfo': {
									'specType': 'setPoint', 
									'setPoint': {'operator': '>', 'value': 10}, 
									'range': {'max': None, 'min': None}, 
									'regex': {'value': ''}, 
									'tolerance': {'tgt': None, 'lsl': None, 'usl': None, 'lel': None, 'lcl': None, 'ldl': None, 'udl': None, 'uel': None, 'ucl': None}
								}, 
								'pickListInfo': {
													'pickListId': 8, 
													'pickListValues': {
																		'Fraction': {'max': None, 'increment': None, 'min': None}, 
																		'Text': {'WARNING': [], 'PASS': [], 'FAIL': [], 'NEUTRAL': [], 'multiSelect': False}, 
																		'Time': None, 
																		'Number': {'max': None, 'increment': None, 'min': None}, 
																		'Tree': '', 
																		'Barcode Scanner': {'script': None}, 
																		'Boolean': {'TRUE': ['Yes'], 'FALSE': ['No']
																	}
												}
								}
				}

checkInfo = {
				"procedureStepId": 45,
				"checkName": "Belt tension reading",
				"checkDescription": "Record the measured belt tension in Newtons.",
				"checkConfig": system.util.jsonEncod(checkConfig),
				"sortOrder": 1,
				"required": True,
				"enabled": True
			}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
procedureStepCheckId, message = system.kanoa.cmms.addProcedureStepCheck(checkInfo, userId)
print procedureStepCheckId, message
```
