- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2025 05:02 AM
Hi Team, I have a requirement to populate list of reports based on Requestor field on the catalog form.
EX- If I have added 'XY' as requestor ...on the name of report field should be populate reports where XY has created the reports.
Requestor -- reference - 'sys_user' table
Name of the report --- reference - 'sys_report' table
I tried below script include but its not getting the records on the form, could you please help me on this code.
GetReportlist: function(reqFor) {
if (reqFor != '') {
var reportSysIDs = [];
var report = new GlideRecord('sys_report');
report.addEncodedQuery('sys_created_by=' + reqFor);
report.query();
while (report.next()) {
var rep = report.title.toString();
reportSysIDs.push(rep.toString());
}
}
return "sys_idIN" + reportSysIDs;
},
Field - Referenec qualifier --- javascript: new GetReportSysIDs().GetReportlist(current.variable.requestor);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2025 03:16 AM
Hello @cp10
Why not try simple way as showcase below.
In your "Name of the report" variable just configure it as show below
Once this is done what value is selected in Requested Variable as per that selection reports which are created by them will show up in that list.
In my case for a user there is only report as below.
Now when I select that user in Requested for variable then in that only same one report is showcased.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2025 03:16 AM
Hello @cp10
Why not try simple way as showcase below.
In your "Name of the report" variable just configure it as show below
Once this is done what value is selected in Requested Variable as per that selection reports which are created by them will show up in that list.
In my case for a user there is only report as below.
Now when I select that user in Requested for variable then in that only same one report is showcased.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.