Calling data export to CSV/PDF/EXCEL from a processor

kikhtenko
Kilo Contributor

Hi,

is there a way to call export data functionality from a processor. I mean can I call something similar to /incident_list.do?CSV inside a processor and return result to the client?

processor.redirect is not an option as it deals with the client side and I would like to hide the 'real' export link?

And the second question is it possible to handle when a processor is being called with an export format processor, 'cause when I call my_processor.do?CSV or my_processor.do?EXCEL it just returns an empty file.

By the way it does the same with every processor.... you can try to call /navpage.do?EXCEL and see what's happening.

Regards,

Andrii

1 REPLY 1

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hi Andrii,



Is your "my_processor" a table name? Exporting data only works from list views or forms that contain table name.



As for your example, /navpage.do?EXCEL will just create an empty EXCEL file, but if you would use XML instead you would see the error:



https://<my_instance>.service-now.com/navpage.do?XML



This XML file does not appear to have any style information associated with it. The document tree is shown below.


<error message="invalid table name" table_name="navpage"/>


Regards,


Sergiu