- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 03:33 PM
Hello,
When I enter my script include into a report, the sysID is returning null.
What would be the reason for this? Below is my script include:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:16 PM - edited 03-07-2024 10:18 PM
Hi @TerryC03 tested in my PDI, works fine now. Follow the below steps
1. Create a client callable script include like below
in your report use in condition like this
sysid ISONE OF javascript: new scriptincludename().latestSprint()
result:
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 02:01 AM
Hi @TerryC03 so you want to show based on safe team? in that case you need to check safe team value in script include to filter results based on team
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 08:12 AM
Hello,
The initial question worked. I'll try to look for help for a dynamic filter option for the interactive filter. Thank you for all of your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 08:57 PM
Hi
The reason because your sprintID variable is initalization to undefined and you are returning nothing that's the reason it is returning null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 09:04 PM
May you give an example of how to return the number of the record. This is what I now have:
var sprintUtil = Class.create();
sprintUtil.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
latestSprint: function(){
var sprintID = [];
var gr = new GlideRecord('sn_safe_sprint');
gr.setLimit(3);
gr.orderByDesc('sys_updated_on');
gr.query();
while(gr.next()){
sprintID = push(gr.getValue('number'));
}
return sprintID;
},
type: 'sprintUtil'
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:05 PM
@TerryC03 Could you please confirm in which scope this script include is created (Global or some other application scope).
Also, the reference field from where you are calling the script include, does it belong to the same scope in which the script include is created or it belongs to a different scope?