How to hide the field in variable set (MRV) on the basis of outside of variable set-catalog variable

jaiho_rai
Kilo Sage

Hi ,

 

I need help from you guys ,

I need to hide the variable - in the variable set on the basis of other variable within same catalog item.

 

E.g My catalog item variable - ABC

 

My catalog item variable set - variable - 123

 

now, on the basis of "ABC" , it will hide within variable set - variable  - "123"

1 ACCEPTED SOLUTION

jaiho_rai
Kilo Sage

 

I tried some alternate ways because I am not getting the options in the conditions,

So I created conditional-based 5 MRVs and hide based on UI policy > Run script.

Let's say:

1- Catalog item Variable --> Request Type - ABC >

Run script - Variable Set --> Request Value > MRV1 (will show) and other MRV2, and MRV3 will be hide 

 

2- Request Type - XYZ 

Run script - Variable Set --> Request Value > MRV2 (will show) and other MRV1, and MRV3 will be hide 

 

Catalog Ui Policy :

Condition - Request Type

Run Script -True

If Yes -

g_form.setDisplay('variable Set Name (MRV1)', true);
g_form.setDisplay('variable Set Name (MRV2)', false);
g_form.setDisplay('variable Set Name (MRV3)', false);
 
If No ,
g_form.setDisplay('variable Set Name (MRV1)', false);
g_form.setDisplay('variable Set Name (MRV2)', false);
g_form.setDisplay('variable Set Name (MRV3)', false);
 
 
and so on..

View solution in original post

6 REPLIES 6

No mate, 

 

This is my MRVS

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

jaiho_rai
Kilo Sage

 

I tried some alternate ways because I am not getting the options in the conditions,

So I created conditional-based 5 MRVs and hide based on UI policy > Run script.

Let's say:

1- Catalog item Variable --> Request Type - ABC >

Run script - Variable Set --> Request Value > MRV1 (will show) and other MRV2, and MRV3 will be hide 

 

2- Request Type - XYZ 

Run script - Variable Set --> Request Value > MRV2 (will show) and other MRV1, and MRV3 will be hide 

 

Catalog Ui Policy :

Condition - Request Type

Run Script -True

If Yes -

g_form.setDisplay('variable Set Name (MRV1)', true);
g_form.setDisplay('variable Set Name (MRV2)', false);
g_form.setDisplay('variable Set Name (MRV3)', false);
 
If No ,
g_form.setDisplay('variable Set Name (MRV1)', false);
g_form.setDisplay('variable Set Name (MRV2)', false);
g_form.setDisplay('variable Set Name (MRV3)', false);
 
 
and so on..