Validating Shown Reference Options From Other Reference Field

Wasdom_Kung
Tera Guru

Hello,

I have an item with two fields:
Manager - references the sys_user table

Requested items - references the requested items table and limits to a specific type of requested item

 

I want to have the requested items reference field only show requested items requested/opened by the manager name in the reference field above, so that it would filter out requests of the same type by other managers.

 

What would be the best way to achieve this? 

1 ACCEPTED SOLUTION

Hi @Wasdom_Kung 

 

Please correct the highlighted text like below :

 

VishalBirajdar_0-1698657261626.png

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

13 REPLIES 13

Can you kindly help share what is that being used. We are no where limiting it by state so it will show all only 'abc' item from the beginning.

Hi Jaspal, here was my attempt:
'u_select_your_manager'  - sys_user table for selecting user

'u_ritm_reference' - requested_item table for showing all ritms to be limited to manager

 

'u_ritm_reference' type specifications set to:

 

javascript:'opened_by='+ current.variables.u_select_your_manager+'^cat_item=NHS Lothian User Account Request';


Removed existing reference qualifier for testing but still shows all ritms in the table.

Thanks. Try below.

javascript:'opened_by='+ current.variables.u_select_your_manager+'^cat_item.name=NHS Lothian User Account Request';

Hi Jaspal,

 

Still having the same outcome, as with the solution from Anand:

Wasdom_Kung_2-1698657001990.png

Wasdom_Kung_3-1698657035109.png

 

Hi @Wasdom_Kung ,
Try below script

javascript:"opened_by=" + current.variables.u_select_your_manager + "^cat_item=cat item sys_id"

Thanks,

Anand