I have a catalog item, and i need to filter the selection choices based on the user in the requested for field, how would i accomplish this?

othomas1
Kilo Guru

I have tried script includes and an onChange script:

I am now going to create a new variable with the same label and different variable name, but i still have to no clue how to only show the software licenses assigned to the user in the requested_for field.

I only want to filter the software asset field to the person in the assigned_to field when The Retrieve Software License option is selected. None of my script includes work and i have tried modifying some reference qualifiers too.

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Odunigan,

 

Can you share the reference qualifier that didn't work for you?

 

Thanks,

Pradeep Sharma

Ujjawal Vishnoi
Mega Sage
Mega Sage

Hi Odunigam,

You need not to use any script include to achieve this.
I am giving you an example how to achieve such scenarios.
Lets say you have two variables of reference type
1. New Group(new_group) referencing to table sys_user_group
2. New User(new_user) referencing to table sys_user_grmember

We want to display the user depending on the group selected.

In the New user variable,we will define reference qual as javascript: 'group='+current.variables.new_group and variable attribute as ref_qual_elements=new_group

Hope this helps.

Regards

Ujjawal

If this resolved your issue then please mark correct. So that this thread can be removed from unsolved list.

this *almost* works in New York, but the User selection dialog shows sysIDs instead of names, and returns Created date.  I need the user name.  Any ideas?