I am pasing sys_IDs to report condition there are records exitsts in table with sys ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2025 12:33 PM
I am pasing sys_IDs to report condition there are records exitsts in table with sys ID's but in report it says no record with sys ID how slove this..?
Script include - i am using
var weeklyreoprtsle = Class.create();
weeklyreoprtsle.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
getReport: function() {
var arr = [];
// Define start and end times
var now = new GlideDateTime(); // current time
var start = new GlideDateTime(now);
start.subtract(7 * 24 * 60 * 60 * 1000); // 7 days ago
start.setDisplayValueInternal(start.getDate().getByFormat("yyyy-MM-dd") + " 09:00:00");
var end = new GlideDateTime(now);
end.setDisplayValueInternal(end.getDate().getByFormat("yyyy-MM-dd") + " 08:59:00");
gs.info('Start: ' + start.getDisplayValue() + ' End: ' + end.getDisplayValue());
var inc = new GlideRecord('x_dgsms_solution_1_pursuit');
inc.addQuery('sys_created_on', '>=', start);
inc.addQuery('sys_created_on', '<=', end);
inc.query();
while (inc.next()) {
arr.push(inc.getValue('sys_id'));
}
var filter = arr.join(',');
gs.info("Filter: " + filter);
return filter;
},
type: 'weeklyreoprtsle'
});
Report it show no records if i appy above script include to filrer in report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2025 06:25 AM - edited 10-15-2025 07:18 AM
Hi @Mannam Praveen ,
this video explains how to use a Script Include in your filter — please follow the same approach for your report filter:
🔗https://www.youtube.com/watch?v=rcwq6pvN-kE
You can also see this article
How to call a script include / server script through reports?
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
