update state via script

Gary22
Tera Contributor

hi all 

 

I am trying to update the status of a control ( sn_compliance_control) using a backend script . 

 

will "state.setValue('Attest')" work or do i need to find the number corresponding to each state of the control . If yes , how do i do that