Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Where to add ?CSV in URL to export file directly

Mike273
Kilo Contributor

I am trying to define a URL to directly export a Report as a CSV file.  The following post  covers this, but uses a very simplified report URL. In my case, I have a more complicated URL and cannot seem to figure out where to add the ?CSV "export format processor" to make this work.  The Export directly from a URL guide is great, but again, shows a much simpler URL than what I am working with.

Can someone help me modify the following Report URL (<instance name> replaced) so it exports the report as CSV?  Any help appreciated.

https://<instance name>.service-now.com/nav_to.do?uri=%2Fsys_report_template.do%3Fjvar_report_id%3D9fba9c80db710854c2c213853296198c%26jvar_selected_tab%3DallReports%26jvar_list_order_by%3D%26jvar_list_sort_direction%3D%26sysparm_reportquery%3D%26jvar_search_created_by%3D%26jvar_search_table%3D%26jvar_search_report_sys_id%3D%26jvar_report_home_query%3D

 

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

The &CSV should work fine. Trick is the URL. Your example URL contains nav_to.do which will not work. What should work is:
https://<instance name>.service-now.com/sys_report_template_list.do%3Fjvar_report_id%3D9fba9c80db710854c2c213853296198c%26jvar_selected_tab%3DallReports%26jvar_list_order_by%3D%26jvar_list_sort_direction%3D%26sysparm_reportquery%3D%26jvar_search_created_by%3D%26jvar_search_table%3D%26jvar_search_report_sys_id%3D%26jvar_report_home_query%3D&CSV

(or at least I attempted to edit your example URL)

 

So you need to open the list in a new window. For example, CTRL+Left mouse click opens a Module in a new window. A new window, without the navigator, so without the nav_to.do?uri etc.. Then simply add &CSV.

Here an example for all active incidents:
https://<instance_name>.service-now.com/incident_list.do?sysparm_userpref_module=b55fbec4c0a800090088e83d7ff500de&sysparm_query=active%3Dtrue%5EEQ&active=true&sysparm_clear_stack=true&CSV

(= tested)

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

5 REPLIES 5

Mike273
Kilo Contributor

Thanks @Mark Roethof! Works perfectly!

I noticed the "nav_to.do" and should have realized I was still in the navigation frames.  Opened report summary module on new window (using CNTRL+LeftClick), and now get a URL with "sys_report_template.do?".  Thanks a lot for the hint!!  Saved me lots of time.  Very much appreciate 🙂