- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 03:20 AM
Script include returns array of values, which we can see in logs. But in the catalog item variable nothing is getting displayed.
Please do the needful.
Regards,
Anus
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 05:59 AM
Hi @Anusha Anus ,
Everything is correct in your case, you just need to make small change in your Script Include on Line 11.
Your Line 11 is like below:
ans.push(grinc.number.toString());
Just change it like below:
ans.push(grinc.sys_id.toString());
As you have applied query sys_idIN<pass the list sys_ids of incidents instead of numbers>
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 05:59 AM
Hi @Anusha Anus ,
Everything is correct in your case, you just need to make small change in your Script Include on Line 11.
Your Line 11 is like below:
ans.push(grinc.number.toString());
Just change it like below:
ans.push(grinc.sys_id.toString());
As you have applied query sys_idIN<pass the list sys_ids of incidents instead of numbers>
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 06:14 AM
You can check below for improving performance and avoiding unwanted query when filtering data.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 12:37 AM
@Anusha Anus Glad to know provided solution worked for you.
But you can check the solution proposed by @Brad Bowman , that is best approach and you don't need script include call and unnecessary GlideRecord query.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 06:06 AM
The values in the array need to be sys_ids, as this is what a reference type variable/field needs for the reference qualifier. So check the box for Client callable, and change your array population line, and you should be all set:
ans.push(grinc.sys_id.toString());
Note that this is a good skill to have in your toolbelt, but in this case since you are doing a simple glide record on the same table as the referenced table (incident) it looks like you can also do this with a different reference qualifier, instead of calling a Script Include.