Skip to content

Commit a3d0bc8

Browse files
authored
Merge pull request #1078 from bkb68/MRVS-Reference-Qualifier-from-Catalog-Item
MRVS Reference Qualifier Includes Value From Catalog Item Variable
2 parents 502f3c7 + aa41920 commit a3d0bc8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function onLoad() {
2+
var mgr = g_service_catalog.parent.getValue('v_manager'); //Catalog Item Variable Name
3+
var filter = g_list.get('v_employee'); //MRVS variable name
4+
filter.setQuery('active=true^manager=' + mgr);
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*** This solution uses g_list, so it works in Service Portal (and I assume ESC) only, not the native UI / Service Catalog interface ***<br>
2+
Developed in collaboration with Chris Perry
3+
4+
5+
On a reference variable in a multi-row variable set, sometimes you want the reference qualifier to include the value of a variable that is part of the Catalog Item, not within the MRVS
6+
7+
When using this script that applies to the Variable set, not the Catalog Item, leave the Reference qualifier field on the MRVS variable empty
8+
9+
In this simplified example, I have a Manager (v_manager) reference variable (sys_user table) that belongs to the Catalog Item. In the MRVS, I have an Employee (v_employee) reference variable (sys_user table). I only want to be able to select user records that are active, and the Manager is the user I selected on the Catalog Item variable.

0 commit comments

Comments
 (0)