How to hide Variable set using UI Policy

anvitha ash
Tera Contributor

Hello,

 

Is it possible to hide Variable Set using UI Policy?

 

EX:

variable a = "xyz choice option",  then only display variable set (demo variable set)

2 REPLIES 2

Community Alums
Not applicable

Solution : 

  • Create a new catalog UI policy.
  • Add Catalog Conditions as per your requirement in the When to apply tab.Save it.
  • Add New Catalog UI Policy Action under Catalog UI Policy Actions related list.
  • Select variable set name that you want to hide. Set visibility false.
  • Save.

UI policy.png

Ui policy action.png

 

Please mark my response as Correct / Helpful

Thanks!

 

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @anvitha ash ,

 

Create catalog UI policy as below

Select proper Catalog item and apply condition on the basis of variable

 

GunjanKiratkar_0-1676281510289.png

 

Script :-

UI type - All

GunjanKiratkar_1-1676281603937.png

 

//If True
function onCondition() {
    g_form.setDisplay('VARIABLE_SET_NAME', false); //writedown variable set backend name
}

 

//If False
function onCondition() {
g_form.setDisplay('VARIABLE_SET_NAME', true); //writedown variable set backend name
}

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy