The value of dropdown --None--

alexcharleswort
Tera Expert

Seems like a rudimentary question. I am writing an onSubmit client script. I want it to say something like if choice_1 is --None-- set order_1 to xxx. What is the value behind --None-- that I can use in my script? I've tried null, Null, NULL, none, None, --None--, -- None --. I have tried reading both the value and the displayValue and I can't seem to get the right one.

Any help would be sincerely appreciated. Thanks in advance!

1 ACCEPTED SOLUTION

chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hi Alex,



It's blank.


View solution in original post

6 REPLIES 6

Abdul Khan4
Kilo Guru

None doesnot have any value.


find_real_file.png


You can use the logic as choice_1=="" then set order_1 to xxx.


Or if(choice_1!="" ){ } else {set order_1 to xxx}


balaji_charapal
Kilo Guru

Hi Alex,




you can try with empty i mean '' instead of none etc..


g_form.getValue('field name ' == '')


you can proceed with your coding..