How to set custom filter in lookup window

guru_elearn
Kilo Expert

Hi,

By default, lookup window shows all information without any filter. I have a requirement to set "Custom" filter in this lookup window. The lookup list would be displayed those are associated with the user role if he/she is as project manager or demand manager. Can any one please help in this?

thanks

Guru

5 REPLIES 5

conmic
Mega Guru

Hello,



do you mean by "lookup" the magnifier behind a reference field?


This can be changed for each field, by modifying its "reference qualifier" in the sys_dictionary.



Capture.PNG



NOTE: depending on the situation it's suggested to add a new dictionary override for the desired field. Changes to the dictionary entry of the field are also inherited by tables extending the current one.


Hi Michel Conter,



Thanks for your response. I mean by "lookup" is the popup window by clicking on the "lens" image button.


Well then there is the answer, the one I provided above: Look into Reference Qualifiers.


Inactive_Us1474
Giga Guru

Simple answer : Reference qualifier.


Select simple and mention filter as Roles is project_manager/demand_manager. OR


Now, select advance as type and mention script as :


javascript:gs.hasRole('project_manager');



Reference Qualifiers - ServiceNow Wiki



Thanks


Akhil


Hit Like/Helpful/Correct, if applicable.