how to hide variables in a multi-row variable set ?

rohit2926
Kilo Contributor

I need to show and hide variables based on choice list options selected in a mmulti-row variable set, can anyone suggest any altrnate for this as Servicenow has made the UI Policy action option "Visible" locked out for Multi-row variable set, nor is the g_form.setDisplay('field_name', false);  working on this type of variable set.

 find_real_file.png

11 REPLIES 11

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Within the Multi-row variable set, this is not possible. Also scripted with Catalog UI Policy script or Catalog Client Script it won't be possible.

Unfortunately, this is one of the current limitations of the Multi-row variable set.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Priyanka Pednek
Kilo Guru

Hi Rohit,

 

As per documentation multi row variable set doesn't allow for catalog UI policy or catalog client script to be written to hide fields of the variable set.


UI policy written inside multiset variable set has this visibilty field as readonly and can't be selected as false.

That won't work if you've got any mandatory fields in the set. First, you have to set them all not mandatory.

Steps 

1. Create a new UI-policy

2. Specify the conditions

3. Create new UI Policy Actions (specify Mandatory/Visible/Read only)

 

For more information check this  http://wiki.servicenow.com/index.php?title=Service_Catalog_UI_Policy#gsc.tab=0

also check this community post:

https://community.servicenow.com/community?id=community_question&sys_id=96dc4729db9cdbc01dcaf3231f96...

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks

Inactive_Us2084
Kilo Contributor

Hi Rohit, 

 

   I have the same requirement, for that U didn't get the solution technically but, I have alternative.

 

 I have taken the two multi-row variable sets.

var1var2var3
   

 

var1var2var3var4var5
     

 One I have shown on while raising service request and hide on RITM. On script level I have hided 1st one, copied entire data into 2nd variable set, shown in RITM.

I have not found any option, so I have done like that. Please let me know if you have any other alternative.

This is genius!