Dynamic Filter on Configuration Item doesnt work
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 01:22 AM
I have a dynamic filter screenshot below :
which calls the SI : TSDynamicFilter.
Script :
var TSDynamicFilter = Class.create();
TSDynamicFilter.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getMyManagedTS: function() {
var my_managed_ts = [];
var ts = new GlideRecord("cmdb_rel_team");
ts.addEncodedQuery('group_type=approval^user_group.manager=' + gs.getUserID());
ts.query();
while (ts.next()) {
var ts_sys_id = ts.ci;
my_managed_ts.push(ts_sys_id.toString());
}
return my_managed_ts;
},
type: 'TSDynamicFilter'
});
when i go to incident table and filter configuration item is dynamic Mymanagedts
I get all the records that have empty Configuration item and not the actual result of 15 incidents belonging to my approval team CI.
Kindly let me know what M i missing ?
everything is in global scope . also we need to use the cmdb_rel_team table only for this POC.
this works through background script , but through dynamic filter even the SI is not called as none of my logs were created .
0 REPLIES 0