Set Variable false/inactive from a Variable set

mann_sn
Kilo Explorer

Hi,

I have a variable set which has a multiple variables "ex: A, B, C & D", Which i'm using in a service catalog item. Now when the variable set is present in service catalog for requester I want all the variables to be active. But when I go as a fulfiller to RITM (Requested Item) record I do not want the variable A to be active but only B, C & D.

Any suggestion how do achieve this?

I tried using UI policy but system doesn't allow me to write a UI Policy Action for one particular variable.

Thanks in advance!

5 REPLIES 5

mann_sn
Kilo Explorer

I tried [g_form.setDisplay('variables.variableName',false);] using client script, did not work for me


bburdick
Mega Guru

Did you create the client script on the sc_req_item form?



function onLoad() {


  g_form.setDisplay('variables.variableA', false);


}


mann_sn
Kilo Explorer

Finally something worked for me:



My variable A was a UI Macro. Once I change it to UI Page the below snippet works for me.



function onLoad() {


  g_form.setDisplay('variables.variableA', false);


}


You can also write a UI Policy on the Catalog Item and check 'Applies to item' box in the Advanced view.