- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:00 AM
hi team,
i am trying to hide variable set in mobile view, for that i have written onload client script for that variable set as below, the same logic is working for variables in item, where as it is not working for variable set items, please find below code and help me on the same. FYI, i am getting both the alerts below, but hiding is not
happening
function onLoad() {
//Type appropriate comment here, and begin script below
var loc = top.location.toString();
loc = decodeURI(loc) ;
alert('hello'+loc);
if (loc.indexOf('mob_order_guide') >= 0) {
alert('hello2');
//g_form.setDisplay('Policies',false);
//g_form.setDisplay('Links_to_MAC_FAQ_and_it_policy',false);
g_form.setVisible('Policies',false);
g_form.setVisible('Links_to_MAC_FAQ_and_it_policy',false);
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:19 AM
Hi,
Change: Applies to --> Catalog Item and select the catalog item name instaed of Variable set name
Use this g_form.setDisplay('VARIABLE_SET_NAME',false); on UI Policy or Client Script.
Replace 'VARIABLE_SET_NAME' with the name of your variable set.
Thanks,
Bhojraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:12 AM
Hi,
Can you try to hide a single variable within your variable set and see if it hides on mobile view? Also use setDisplay()
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:16 AM
Hi,
See this:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0610336
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2019 02:19 AM
Hi,
Change: Applies to --> Catalog Item and select the catalog item name instaed of Variable set name
Use this g_form.setDisplay('VARIABLE_SET_NAME',false); on UI Policy or Client Script.
Replace 'VARIABLE_SET_NAME' with the name of your variable set.
Thanks,
Bhojraj