- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 09:29 AM
Hi All,
May i please know, How to Hide a variable on the portal i have a variable on the portal which I am hiding using a client script
but on Portal it is getting retained no matter what.
I tried using the UI policy/client script and it doesn't work on portal.
Client script:
function onLoad(){
var url = top.location.href;
if(url.indexOf('/sp') > -1){
// this is sp page and hide the variable
g_form.setDisplay('fiedname', false);
}
}
ui policy:
g_form.setDisplay('fieldname', false);
This will be very helpful if I get a solution to this.
Thanks,
Saurabh
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 05:21 AM
Apologies on the delay, I have got this fixed my self had to remove a few check boxes on the Availability tab. and it worked fine for me, removed field from the portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 05:21 AM
Apologies on the delay, I have got this fixed my self had to remove a few check boxes on the Availability tab. and it worked fine for me, removed field from the portal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 09:56 AM
Hi,
If you only want to hide/show a variable in the Service portal, there is no need to script, you could create a Catalog UI policy and a UI policy action to show/hide that variable depending on your selections (other variables).
Just make sure that the UI policy is set to run in portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 12:26 PM
Hi Olan,
I have tried this as well in our instance no matter what it always keeps showing up on the created RITM details section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 12:31 PM
Hi Olan,
The script/ui policy works perfectly on the form level but on the portal this field stays back no matter what we do.
Regards,
S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 01:11 PM
Okay,
Things to check.
Is the variable marked as mandatory?
Are there other (conflicting) Catalog UI Policies / Catalog Client Scripts?