- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 10:38 PM
Not able to get the script include values in the report
Values is showing as NULL
Code Snippet :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 11:10 PM
Hi @JAYESH KUMAR YA ,
Check the Sandbox enabled checkbox on the script include and try
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 10:47 PM
I think in your script include, this is all you need and remove everything else. Then try in your report.
function getMyid() {
var arr = [];
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', '57af7aec73d423002728660c4cf6a71c');
gr.query();
if (gr.next()) {
// gs.info("Incident number: " + gr.number);
arr.push(gr.sys_id.toString());
}
return arr;
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 10:54 PM
I tried but its returning NULL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 11:10 PM
Make the script include name identical to the function name.
So script include name should be getMyid and in the report, just call javascript: getMyid();
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 11:10 PM
Hi @JAYESH KUMAR YA ,
Check the Sandbox enabled checkbox on the script include and try
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya