- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 03:35 AM
Since upgrading to Orlando the following script has stopped working on the portal:
g_form.setMandatory("<variable set>", false);
g_form.setDisplay("<variable set>", false);
After playing with it I found that it was just the setMandatory that is not working, I'm not sure if this is intentional or a bug with Orlando.
Are there any other ways of doing the same thing without having to set all variables to be not mandatory individually as there are a quite a few variable and they might change at a later stage.
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 01:57 AM
ServiceNow have told me that they have raised a problem and are targeting a fix for Paris.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 04:53 AM
can you try with setVisible() instead of setDisplay()
https://hi.service-now.com/kb_view.do?sysparm_article=KB0718679
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 05:04 AM
Hi Luke,
I am able to reproduce this in my Orlando version
Script Used: Catalog Client Script on Variable Set
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setMandatory('user_details', false);
g_form.setDisplay('user_details', false);
}
Script which worked: I used individual variables
function onLoad(){
//Type appropriate comment here, and begin script below
g_form.setMandatory('name', false);
g_form.setMandatory('email', false);
g_form.setDisplay('name', false);
g_form.setDisplay('email', false);
}
It hides the variables by 1st making it mandatory false and then hiding using that in native but not working in portal view
Working in Native View:
Not Working in Portal View:
If that was working in previous version please raise a HI ticket with ServiceNow. I don't have any other PDI to test this out.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 05:31 AM
Ye this is the exactly what I found as well, and yes this was working pre-upgrade so I have raised a Hi Portal ticket.
I will update this if I get an answer from ServiceNow.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2020 09:36 PM
Hi Luke,
Did you get an update?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 01:57 AM
ServiceNow have told me that they have raised a problem and are targeting a fix for Paris.