Reference Qualifier for a variable based on the values of three previous variables

BALAJI K R
Tera Expert

Hi,

We have a requirement for making a list collector field (server) to show choices based on the values of variables selected previously (environment, operating system and application). We have a table including these 4 fields. There is a field in the table (Type) to differentiate the data from Application or Server.

What we need is a reference qualifier on the server variable to populate choices with :

1. Type is Server, filter the choices based on the selected application, environment and operating system variables.

 

My script: javascript:'current.variables.server='+'^u_type='server+'^u_environment='current.variables.environment+'^u_operating_system='current.variables.operating_system+'^u_application='current.variables.application;

 

Thanks.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi @BALAJI K R 

please try this

javascript:"u_type=server^u_environment="+current.variables.environment+"^u_operating_system="+current.variables.operating_system+"^u_application="+current.variables.application;

Also ensure in the variable attributes of the list collector you add this

ref_qual_elements=environment;operating_system;application

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Hi Ankur,

Thanks it helped.

Hi @Ankur Bawiskar 

Can this be used in a Multi Row variable set?

Considering the environment, operating system are independent and Application, Server are in MRVS. if no, How can we achieve this?

Thanks

 

Hi,

there are some restrictions when you wish to add advanced ref qualifier on MRVS variable based on outside variables

but here is a workaround

https://community.servicenow.com/community?id=community_article&sys_id=b92de10cdb146410fa192183ca961...

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader