How do you change a field's value to the None choice in script?

stinky2nine
Tera Contributor

http://wiki.servicenow.com/index.php?title=Customizing_Choice_Lists#Values_Associated_with_.22None.22_option

says that the "None" option does not have a sys_choice record associated with it. I tried setting the field to following values but they all failed to become None.
- '' (empty string)
- '0'
- 0
- null

10 REPLIES 10

CapaJC
ServiceNow Employee
ServiceNow Employee

The following for me, in a Client Script, set the Category field to "-- None --"



g_form.setValue("category", "");


CapaJC
ServiceNow Employee
ServiceNow Employee

The following also worked:



g_form.clearValue("category");


What if you are not using GlideForm? How about GlideRecord?


stinky2nine
Tera Contributor

What if you are not using GlideForm? How about GlideRecord?