- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:00 AM
Hi,
We have 2 reference qualifiers for Configuration Item field, both of them works fine individually. When I combine those 2 together in advanced qualifier script, then only one of them works. I noticed that the later one always overrides the former one. These 2 ref quals are different from each other.
First ref qual:
javascript: var refQual=''; refQual;'install_statusNOT IN12,15,7,14^sys_class_name=cmdb_ci_aix_server^ORsys_class_name=cmdb_ci_computer;
Second one looks like this:
javascript:if(!(gs.getUser().isMemberOf("ABC"))){"^sys_id!=000000000000000000";}
Any suggestion would be appreciated!
Thanks in Advance,
Su
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:26 AM
You can use a large Script. (if the script gets too large you can call a script include to return the query instead)
javascript:
var refQual = 'install_statusNOT IN12,15,7,14^sys_class_name=cmdb_ci_aix_server^ORsys_class_name=cmdb_ci_computer';
if (!(gs.getUser().isMemberOf("ABC"))) {
refQual += "^sys_id!=000000000000000000";
}
refQual;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:26 AM
You can combine the two into a single javascript statement, but if you mean can you have javascript:<code> more than once, then no.
You'd need to write it out a single line of javascript.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:26 AM
You can use a large Script. (if the script gets too large you can call a script include to return the query instead)
javascript:
var refQual = 'install_statusNOT IN12,15,7,14^sys_class_name=cmdb_ci_aix_server^ORsys_class_name=cmdb_ci_computer';
if (!(gs.getUser().isMemberOf("ABC"))) {
refQual += "^sys_id!=000000000000000000";
}
refQual;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:37 AM
That's it, it works like a charm!!
I just changed my first line of code as you suggested and it is working now. Both of the ref quals.
Thanks a ton!
Su

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 09:42 AM
Good! I am glad it worked out (: