Set Variable false/inactive from a Variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2015 09:46 AM
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!
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2015 09:56 AM
I tried [g_form.setDisplay('variables.variableName',false);] using client script, did not work for me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2015 10:13 AM
Did you create the client script on the sc_req_item form?
function onLoad() {
g_form.setDisplay('variables.variableA', false);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2015 11:32 AM
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);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2015 08:11 AM
You can also write a UI Policy on the Catalog Item and check 'Applies to item' box in the Advanced view.