Hide a variable on the Order Guide but not the Catalog item

deepaltrivedi
Mega Contributor

Hello!

I've Onboard a User Order Guide that displays variable set from Catalog Item.   The issue is that we want to hide some variables on the Order Guide but still display them if the user goes to catalog item to submit a request.   It looks like Client Script is needed for this to work in Helsinki but not sure how.   UI Policy hides the variable on the Order Guide but also on the Catalog Item which wouldn't work for us.

Appreciate any tips on this!

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Select the UI type to both and you are good to go


View solution in original post

29 REPLIES 29

I have unchecked the Visible on guides checkbox for the variable and it worked for me on Helsinki. After unchecking the variable, do a cache.do and see if that works


Can you please provide detailed steps and variable you tried on? unchecking and then doing cache.do didn't work for me


I have opened the catalog item "standard laptop" in my order guide and opened a variable in that catalog item and unchecked the Visible in guide in the availability tab as shown below


find_real_file.png


Ah. It's removed from the Guide on below screen BUT appears still when viewing New Hire from the Service Portal.   The field should be hidden from Service portal too.   Both screenshots are below. Does it work for you from Service Portal?



Works here:


Screen Shot 2016-12-29 at 2.00.23 PM.png



Not working here:



Screen Shot 2016-12-29 at 2.02.24 PM.png


deepaltrivedi




Here you go. Create an onLoad client script on the catalog item and put this script in there



function onLoad() {


    var isOrderGuide = g_service_catalog.isOrderGuide();


        if(isOrderGuide){


            g_form.setDisplay('Additional_software_requirements', false); //put your field name here


          }




}