Exporting lists and records as .pdf or other special document types using the special file processorsIssue Although most people are aware of the method which can be used to export reports, dashboards, and homepages to a .pdf file (using the appropriate menu selections) and other special file types, the platform also supports a simple method to also export a standard list of records for most record types. Although not necessarily intuitive, the capability does exist and this article will explain how this can be done. Procedure The actual procedure to generate such a .pdf formatted output is to simply type in a specially formatted URL on the instance, as follows: https://<instance-name>.service-now.com/<RecordType>_list.do?PDF Where <instance-name> is the instance name on which the records are to be found and, <RecordType> is the table name of the records for which the .pdf export is needed (i.e. incident). As an example, the following would return a .pdf formatted document containing all the records found in the Incident table. https://<instance-name>.service-now.com/incident_list.do?PDF Note that the output list is subject to all ACL and other security restrictions of the current, logged-in user who is requesting the .pdf document on the instance. The resultant .pdf file will be exported and normally stored in the local computer's downloads folder. The name of the exported .pdf file will be the ServiceNow table name which contained the records exported with an extension indicating the type of the file, in this case, .pdf. If another file already exists in the directory with that same name, the file will also include a number to distinguish it amongst any other similarly named files, for example, incident (1).pdf. The resulting file, if opened, will then be a formatted list of records in the specified table in .pdf format, such as the following: Ordering of a specific field on that form can also be specified by using the sysparm_orderby parameter appended to the URL. Thus, the URL might be in something similar to the following format: https://<instance-name>.service-now.com/<RecordType>_list.do?PDF&sysparm_orderby=<FieldName> Where <instance-name> and <RecordType> are as in the previous URL and <FieldName> is the internal field name for which you want to order by (in ascending order). In fact, in addition to modifying the order of the list, similar syntax can be used to specify filters that can be included in the URL to limit the actual records returned by the query. This is done through the use of the sysparm_query parameter. The format of this type of query might appears similar to the following: https://<instance-name>.service-now.com/<RecordType>_list.do?PDF&sysparm_query=<Query_Parameters> Where <instance-name> and <RecordType> are as in the previous URLs and <Query_Parameters> is the specific ServiceNow formatted query. As an example, the following URL would result in a .pdf exported file showing a list of all Incidents in which the Active field was set to true, the current State of the Incident was "In-Progress" (Choice List value 2) and the Category was set to "Inquiry / Help" (Choice List value of inquiry): https://<instance-name>.service-now.com/incident_list.do?PDF&sysparm_query=active%3Dtrue%5Estate%3D2%5Ecategory%3Dinquiry Note: A simple method to obtain the specific needed, including the <Query_Parameters> for a .pdf list export is to first create the list in the list filter criteria for that record type, then right click on the filter criteria breadcrumb header and select Copy URL. The resulting URL should then be modified to include the ?PDF& section included in the appropriate location to generate the .pdf document export. In addition to the capability to export PDF documents, the system also supports a similar export functionality for several other document formats. The URL used would be very similar to that used for export for a PDF document. The following URL shows a possible format for this URL that might be used: https://<instance-name>.service-now.com/<RecordType>_list.do?<Document_Format>&sysparm_query=<Query_Parameters> Where <instance-name>, <RecordType>, and <Query_Parameters> are as described above. The <Document_Format> format would be the specific document type to export to, in all capital letters. The following is a complete list of these formats (in addition to the PDF format) that can be specified as the Document_Format: CSV: Comma Separated Values. Specifying this option will save to the local machine a file containing a comma-delimited list of field values and records. This file will be saved with a name similar to incident.csv (or incident (3).csv). An example of such a URL might appear as the following: https://<instance-name>.service-now.com/incident_list.do?CSV&sysparm_query=active%3Dtrue%5Estate%3D2%5Ecategory%3Dinquiry This type of file can be easily opened in a spreadsheet program. XLS or XLSX: Specifying one of these file types will export the data into a format which would normally be opened in a Spreadsheet application. Both .xls and .xlsx are spreadsheet type formats, the .xls is a binary data file while an .xlsx file uses the Open XML formatting. Most spreadsheet applications can open both types of files, although the .xlsx format is a somewhat newer format An example of such a URL might be the following: https://<instance-name>.service-now.com/incident_list.do?XLSX&sysparm_query=active%3Dtrue XML: Specifying XML in the URL will cause the system to generate an XML equivalent of the record or records which are part of the list. In most browsers, because xml is a legitimate type of data which can be displayed in a browser window, this will often simply open a new window. However, this data can be saved or copied to another text application to persist the actual .xml file to the local machine. The URL to export as XML might appear similar to the following: https://<instance-name>.service-now.com/incident_list.do?XML&sysparm_query=active%3Dtrue%5Estate%3D2%5Ecategory%3Dinquiry Similar to a list export, an individual record from a table can also be quickly exported from an instance using a specific URL. In that case, the URL would appear as the following: https://<instance-name>.service-now.com/<RecordType>_list.do?PDF&sysparm_query=sys_id%<sys_id> Where <instance-name> is the instance name on which the records are to be found and <RecordType> is the table name of the records for which the .pdf export is needed (i.e. incident), and <sys_id> is the specific System ID of the record you want to export to a .pdf format file. The name of the file will be similar to that as exported using the list URL (i.e. incident.pdf). The resulting exported .pdf document, if viewed in the appropriate view will appear similar to the following: Note that all of these export functions can also be done directly by using the export option from the Contextual Menu as associated to the record or list display, however using the direct URL's can often be faster or used as part of a browser shortcut.