- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 07:48 PM
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
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 07:53 PM
Hi @Gary22 ,
The syntax is wrong.
If you are writing this at client script you need to use something like this:
g_form.setValue("state","Attest"); //Attest being the value, if attest is not the value then enter the proper value
If you are writing this at server script you need to use something like this:
current.setValue("state","Attest");
or
grObj.setValue("state","Attest"); //grObj being the glide object
If you want to know the values of the state, open the form right click on state and click configure dictionary, scroll down to the choices you can find the values over there.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 07:53 PM
Hi @Gary22 ,
The syntax is wrong.
If you are writing this at client script you need to use something like this:
g_form.setValue("state","Attest"); //Attest being the value, if attest is not the value then enter the proper value
If you are writing this at server script you need to use something like this:
current.setValue("state","Attest");
or
grObj.setValue("state","Attest"); //grObj being the glide object
If you want to know the values of the state, open the form right click on state and click configure dictionary, scroll down to the choices you can find the values over there.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.