Is it possible to make a filter default in a Reference field?

spracntgw
Kilo Expert

Hi All,

All I want to do is to make my filter default (in a pop up window of a reference field), but I don't know how to do.

Could you please give me some advice to me?

-------------------------------------------------------------------------------------------------------------------------------------------------

Below is a pop up window of a reference field (sys_user table).

Usually it is not narrowed down, hence All users are always shown.

1.PNG

Is it possible to set the filter from the moment that I opened the reference field?

2.PNG

I have made my filter (red out),

I guess my wish will come true by setting the red-out be defaulted....

(Reference Qualifiers is NOT good because it does not display Breadcrumbs)

3.jpg

Best regards,

Tomoaki

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Tomoaki,



The only way to make a filter on the reference field is with a reference qualifier. As you noted, there are no breadcrumbs - because the intent is to not allow the user to modify the filter.



There is currently no way to specify a default filter with editable breadcrumbs afterwards.



If you feel it is an important feature, I invite you to open an enhancement request! Our product managers DO listen.


Enhancement requests: Tell us how you would improve the ServiceNow product


View solution in original post

12 REPLIES 12

The SN Nerd
Giga Sage
Giga Sage

If you want an 'always on' default type filter that applies to all aspects of the tool, consider a before query business rule.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

spracntgw
Kilo Expert

Much thanks to comment, Paul!


You mean, it is possible to make my filter default in entire ServiceNow environment using a business rule?


Could you teach me a little more detail information if you are OK.


Hi Tomoaki,



Yes, a before/query business rule allows you to systematically filter the records. For example, the OOB business rule "user query" simply adds a filter to get only active users if you are not an admin.



https://YOURINSTANCE.service-now.com/nav_to.do?uri=sys_script.do?sys_id=62a7bfaf0a0a0a6500c49682bd82...



Change YOURINSTANCE to your instance name in the URL above.


I owe you a 'thank you' for reminding me about this. It will be included in my "Community Quick Tip" section of TechNow Ep 36 when I discuss reference qualifiers.


Sigval Bergesen
Tera Contributor

I don't think that an on query business rule mentioned by Paul is what you are after, it will result in the same as the reference qualifier, a filter that you cannot edit, only that the business rule will make it global, not just for this field. 

I guess you rather want this to be a global filter, that is editable, if so you could try and go to the  table itself which this reference field is referring to, and from here right click and select configure list control, at this form you may set a default filter (note that it might be that you'll have to add this default filter field to the form here), once set, then this should be the default filter for this table no matter where it is accessed from. sounds like this is what you want, but if you on the other hand only wanted an editable filter only when clicking on the magnifying glass from this reference field only, then I belive Tomas is right, you cannot do that for now it seems like. 

Note that I didn't double check this right now though, but you can try, but note that if it works it should in theory make it global, but sounds like this is what you're actually after anyway.

Good luck 🙂