The CreatorCon Call for Content is officially open! Get started here.

Filter the search result in reference field

thisisauniqueus
Giga Expert

Hi

Is it possible to filter the search result in a reference field, say for example if a project field is referenced in a table like

find_real_file.png

can i filter the results when i click on the search icon as shown in the screen shot above?

Regards

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi John,



Yes, you can do that quite easily! Reference fields can use what's called   "Reference qualifier" to filter records on the table they reference. By default, you get all the records. If you want to filter them, you can do that quite easily using a reference qualifier. They range from simple (no scripting required) to more advanced (scripted.)



Go to the dictionary entry for that field and note the "Reference specification" section.



Here's an example of a reference qualifier on a table to simply take the Active records of the User table.



find_real_file.png



Reference: Reference Qualifiers - ServiceNow Wiki


View solution in original post

14 REPLIES 14

Hi John,



I'm not quite clear what it is you are trying to do. The columns that appear in the reference lookup (e.g. project number, short description, etc.) are static rather than dynamic.



find_real_file.png



If you configure the ref_ac attributes per Pradeep's link, you determine which columns are displayed. From there on, they are always visible when filling in data in the field.



Auto-Complete for Reference Fields - ServiceNow Wiki


sorry for the confusion ... when i click on the look up icon of referrence field   a popup appears which showing the list of values from the referenced table can i add columns in that popup ?




Regards


Hey John,



Sorry I am confused. As per your earlier question can it be shown/hidden then the answer is NO


If you have to pull additional columns then you can customize the popup view. Follow below link for instructions(SECTION 2)


Customizing the Reference Icon - ServiceNow Wiki



Kindly let me know if you are blocked.


please refer to the screen shot below, sry for the confusion



find_real_file.png



Regards


Yes sir it is possible


Here you go. In below link replace instance name


<your instance name>.service-now.com/sys_user.do?sysparm_view=sys_popup



Now personalize the form and pull the fields which are required.


http://wiki.servicenow.com/index.php?title=Personalizing_Forms