Choice vs Reference

She Sull
Giga Guru

What is the difference between the Choice field type and the Reference field type? In Managed Documents, the Type (document type) field shows it is a reference field when you right click and select Show- 'type' , but it seems to be behaving like a Choice field and even provides the options Personalize Choices and Show Choice List.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Sherry,



Here is my understanding


Type :Choice:


  • if field type is choice then you see Drop-Down list of choices.(It can be reference to the table)
  • The choice can be personalized

Type:Reference


  • Query that displays records from another table
  • Here we dont see the behavior of field as drop-down


I hope this helps



Thanks,


Pradeep Sharma


View solution in original post

12 REPLIES 12

Hi Sherry,



If you want to put some something like a ref qualifier on a choice field, I would suggest using a client script.


You can put in whatever condition is that you want and then add or remove options from the choice list accordingly. Below is the wiki link on how to add/ remove options from a choice field using client side scripting.



GlideForm (g form) - ServiceNow Enterprise Wiki


http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#clearOptions


GlideForm (g form) - ServiceNow Enterprise Wiki



Hope this helps..



Thanks & Regards,


Hari


You cannot have a reference qualifier on a native choice list. However, on a reference field that is only displayed as a choice list, reference qualifiers are possible. I have just tried this in one of the demosandbox instances: Adding order<=3 as a reference qualifier to the Type field on Document [dms_documents] table results in types "Policy" and "Guideline" (order 1 and 2 respectively) being displayed and types "Procedude" and "Contract" (order 3 and 4 respectively) hidden.


Thanks again, Slava. I just had an "aha" moment. I'll post feedback once I get this working.


HI Slava,



I am actually trying to do this, make the one of the reference fields on my service catalog look like a drop down list, that way I can see the options I have and use the dot walking capacity as well. But I am not seeing that option specified in the link you mentioned.



Thanks,


Ravali


rajiv069
Kilo Expert

Hi Sherry,



The reference fields are actually the fields where you can query your requirements by using either reference qualifier or by pushing the filter through a global BR or script include.


But in case of Choice field you can filter the values by using global BR or script include only. This is how this works in SNOW.



Thanks.