- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 09:33 AM
The report calls for a list of releases that do not have associated changes.
I've created a report filter as:
Sys ID does not contain javascript:RefQualFilter().findReleaseWithChangeReq(current)
The intention of script include is to gather all releases from our many-to-many change to release relationship and push them back to the report filter.
The issue is that "current" throws a not defined error. Any advice would be greatly appreciated on how to pass current from a report filter?
Solved! Go to Solution.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 09:40 AM
There shouldn't be any current if it is getting called from report. Also if the script include is class based, then new operator is missing for object creation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 09:40 AM
There shouldn't be any current if it is getting called from report. Also if the script include is class based, then new operator is missing for object creation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 09:46 AM
Kalai, appreciate the reply. Your exactly right, I don't need current as I only need to pass all release sys_ids back to the report for the filter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 09:43 AM
You will not have access to current. here and your script include should be a client callable.. Post your script include code here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2016 05:56 AM
Abhinay, here's the filter and script include.
Report filter: Sys ID is not javascript: new MWRefQualFilter().MWfindReleaseWithChangeReq()
Client Callable Script include:
var MWRefQualFilter = Class.create();
- MWRefQualFilter.prototype = {
initialize: function() {
},
MWfindReleaseWithChangeReq: function() {
var answer = [];
var gr = new GlideRecord('u_m2m_change_requests_releases');
gr.addQuery('u_change_request.state', '<',2); // get all change requests considered 'open'
gr.query();
while (gr.next()) {
answer.push(gr.getValue('u_release'));
}
return answer;
},
type: 'MWRefQualFilter'
};