- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 06:45 AM
Hi all,
I'm having troubles with a catalog client script (see below). I use the script to hide common Cascaded Variables in an order guide.
This works fine when using the service catalog in the instance. The variables are only shown in the "Describe needs" tab and are then hided on the items in the "choose options" tab.
But when I test this in the portal it doesn't work and I receive the following message: (There is a JavaScript error in your browser)
More in detail it shows me this message:
In the client script I already changed the type from "Desktop" to "all" but this doesn't fix the issue.
This is the script:
and this is another screenshot of the used config:
Anyone an idea to fix this?
Thank you !
David
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 11:37 AM
Hi David,
Since it's seem to be only 2 items you want to hide on the catalog items I would probably do like this (and not thinking you use this set somewhere else.
1. Create the two variables on the order guide "manually".
2. Have a variable set with the two variables on all the items. Only important thing here is that they have the same name as on the order guide, then the cascade will work.
3. Create a Catalog UI Policy with no conditions meaning it will always be true and then set so the fields is hidden.
Does that sound logic to you?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 06:54 AM
Hi David,
Problem is that $ isn't supposed in the Service Portal. So that is what it's complaining about. I'm not sure what you are trying to do, but it seems like you trying to hide something. Have you tried using the Catalog UI Policy for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 07:15 AM
Hi Göran,
What I try to accomplish is the following.
I have an order guide, on the "Describe needs" tab I have a variable set displayed. Based upon the values entered there options will be displayed in the next tab.
The option Cascade Variables is checked to the information is passed to the catalog items. The catalog items have the same variable set configured.
I don't want to display the same set on the catalog items under the "Choose options" tab, but I want to hide them.
With the script i shared that works, but only in the service catalog in the instance, not using the Service Portal.
I just very quickly configured a UI Policy, and that works but it also hides the variables on the "Describe Needs" tab when you go back.
Do you have an idea on how to configure an UI Policy that hides cascaded variables on the catalog items?
Thx
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 11:37 AM
Hi David,
Since it's seem to be only 2 items you want to hide on the catalog items I would probably do like this (and not thinking you use this set somewhere else.
1. Create the two variables on the order guide "manually".
2. Have a variable set with the two variables on all the items. Only important thing here is that they have the same name as on the order guide, then the cascade will work.
3. Create a Catalog UI Policy with no conditions meaning it will always be true and then set so the fields is hidden.
Does that sound logic to you?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2018 12:35 AM
Hi Göran,
That worked for me. I had the varable set configured on the form. By adding the variables manually, I was able to get it to work.
Thanks
David