filter condition on reference field

Rj27
Mega Guru

Hi All,

I need to display values in 'requested for' field on ritm table based on some conditions.
My instance setup:
1. I am working on a domain separated instance.

2. 3 domains are there (d1,d2,d3)

3. I am an itil user in domain d1 but i have visibility in d2 because of some roles. So i can see the ritms for d2 as well.

4. Currently requested for is displaying users for d2 because of following script:

     reference qualifier on requested for:

      javascript:new GetRequestors().getrequestorsRITM(current)

     script in script include called above: 

     query = 'active=true^sys_domain='+current.sys_domain;
     return query.toString();

My requirement:

i need to display users from d1 domain as well but the lookup should not display values together onclicking the lookup option of ref field.

That is, d1 users should only be visible when user gives filter..
find_real_file.png

is this feasible? Can this be achieved?

 

5 REPLIES 5

Bhagyashri Sort
Kilo Guru

Hi,

 You can use the reference qualifier to get the filtered data on reference field.

https://www.youtube.com/watch?v=6V1Vf-pk1wc

https://docs.servicenow.com/bundle/orlando-platform-administration/page/script/server-scripting/conc...

 

Mark it correct and helpful.

Thanks

Bhagyashri Sorte.