How to Construct the List report URL

nataraj1
Kilo Contributor

Hi Everyone,

 

I am trying to change the SLA Availability Gadget reports.

My requirement is I need to generate a link to open LIST report with pre-populated table name and some filter conditions.

 

Below Availability and Calender type report URLs are working perfectly when I click my constructed URLs.Results are attached.

 

Type: Calendar

 

var url = 'sys_report_template.do?sysparm_table=change_request$[AMP]sysparm_type=calendar$[AMP]sysparm_cal_field=end_date$[AMP]sysparm_from_list=true$[AMP]sysparm_manual_labor=true$[AMP]sysparm_query=^end_date%3Ejavascript:gs.endOfLastMonth()';

 

Type: Availability

                                                    var filter = "service_commitment=" + avail.service_commitment;

                                                    filter += "^service_offering=" + avail.service_offering;

                                                    filter += "^type=daily^startBETWEENjavascript:gs.daysAgoStart(7)@javascript:gs.daysAgoEnd(0)^EQ^TRENDBYstart,date";

                                                    var url = 'sys_report_template.do?sysparm_type=availability';

                                                    url += '&sysparm_title=${URL:avail.service_offering.name} SLA Results (Last 7 days) ${URL:avail.service_commitment.name}';

                                                    url += '&sysparm_table=service_sla_result';

                                                    url += '&sysparm_chart_size=large';

                                                    url += '&sysparm_manual_labor=true';

                                                    url += '&sysparm_trend_field=start';

                                                    url += '&sysparm_trend_interval=date';

                                                    url += '&sysparm_aggregate=AVG';

                                                    url += '&sysparm_sumfield=absolute_percentage';

                                                    url += '&sysparm_query=' + filter;

                                                    url;

 

 

I tried to modify above both codes to generate LIST type report, but either code is not working!

 

Try : 1

 

var url = 'sys_report_template.do?sysparm_table=service_sla_result$[AMP]sysparm_type=list$[AMP]sysparm_manual_labor=true$[AMP]sysparm_query=^startBETWEENjavascript:gs.daysAgoStart(7)@javascript:gs.daysAgoEnd(0);

 

Try: 2

                                                    var filter = "service_commitment=" + avail.service_commitment;

                                                    filter += "^service_offering=" + avail.service_offering;

                                                    filter += "^type=daily^startBETWEENjavascript:gs.daysAgoStart(7)@javascript:gs.daysAgoEnd(0)";

                                                    var url = 'sys_report_template.do?sysparm_type=list';

                                                    url += '&sysparm_title=${URL:avail.service_offering.name} SLA Results (Last 7 days) ${URL:avail.service_commitment.name}';

                                                    url += '&sysparm_table=service_sla_result';

                                                    url += '&sysparm_manual_labor=true';

                                                    url += '&sysparm_query=' + filter;

                                                    url;

 

Could anyone please help me on how to generate/construct LIST report URL?

8 REPLIES 8

I am so glad I found your reply.   What I had been struggling to do for some time cracked in about 15 mins with the info you provided.     Many thanks!



How did you manage to find this info out.   I would like to know so that I can possibly use it as a starting point for future URL constructions


Thanks for sharing Ralph.


timt
Kilo Contributor

Excellent Ralph... saved me loads of time.   Much appreciated.



I am constructing data on the fly so my filter is generating a sys_id on the fly for each call.   This works perfect... but I don't want the user to be able to save this report... I need them to re-generate it each time.



Any idea how I might be able to disable the 'Save', 'Insert', and 'Insert and Save' options on the generated report?


This is a question to any that's an SME with report URLs. Is there a parameter that would allow me to display the report / list without any header/footer/filter artefacts. I.e. display the contents of the report / list the same way it would appear in a widget on a dashboard?