Hide order guide variables in choose options?

naveenmyana
Giga Expert

Hello Everyone,

I have created a variable set which I use in Order Guide and also in the catalog items that will be used in order guide.

Once I enter the data in variables of the variable set I am looking for a way to hide this variables in the variable set  in the 'Choose Options' section on Order guide because they are the same variables appears in the all catalog items of order guide and make the form look ugly.

I have tried the below onload script and its working only in describe needs section and cannot hide fields in Choose options.

function onLoad() {
//Type appropriate comment here, and begin script below
var item= gel("current_item");
var guide = gel("sysparm_guide");
alert('start');
if (item != null && guide != null && item.value == guide.value)
g_form.setMandatory('requested_for',false);
g_form.setDisplay('requested_for',false);
}

Any suggestions?

find_real_file.png

find_real_file.png

 

9 REPLIES 9

Harish Ragz
Kilo Guru

Once check the below link. It may help you.

Cascade an order guide variable

Please Hit Correct(If it is a correct solution) or Hit Helpful(If it is useful).

Hi Harish,

 

I have tried this code already,but its not working in choose options stage of order guide.

Once try the below script.

function onLoad() {
 var abc = g_service_catalog.isOrderGuide();
 
 if(abc == true)
 {
 g_form.setDisplay('requested_for',false);
 }
}

Hi harish,

 

Tried this no luck..I have put an alert to see if its going inside loop but not working.

function onLoad() {
//Type appropriate comment here, and begin script below

var abc = g_service_catalog.isOrderGuide();

if(abc == true)
{
alert('OG');
g_form.setDisplay('requested_for',false);

}

}