<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Export Report in CSV format using a script in Platform Analytics forum</title>
    <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255371#M31081</link>
    <description>&lt;P&gt;so i tried this&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Invoke-webRequest -OutFile "Path\report.csv" -Uri "&lt;/SPAN&gt;&lt;A title="k-external-small" class="jive-link-external-small" href="https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=b2343242h24324hbg24e2&amp;amp;sysparm_orderby=u_correlation_id" rel="nofollow" target="_blank"&gt;https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=b2343242h24324hbg24e2&amp;amp;sysparm_orderby=u_correlation_id&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;THis gave me 50,000 records arranged by correlation id. Then i tried this&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Invoke-webRequest -OutFile "path/Report.csv" -Uri "&lt;/SPAN&gt;&lt;A title="k-external-small" class="jive-link-external-small" href="https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=basfoffhfffdss&amp;amp;sysparm_query=u_correlation_id%3Efsdfjsdfkjsdfjsdlfkj&amp;amp;sysparm_orderby=u_correlation_id" rel="nofollow" target="_blank"&gt;https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=basfoffhfffdss&amp;amp;sysparm_query=u_correlation_id%3Efsdfjsdfkjsdfjsdlfkj&amp;amp;sysparm_orderby=u_correlation_id&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;But this gave me the same 50,000 rown, i used the %3E to specify greater than to get the next 50,000 rows. Any idea what i am doing wrong?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;you can ignore the report id number as i just made up for the sake of the example&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 11 Jan 2018 23:45:56 GMT</pubDate>
    <dc:creator>knowledgeenthus</dc:creator>
    <dc:date>2018-01-11T23:45:56Z</dc:date>
    <item>
      <title>Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255361#M31071</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have figured out a script to export report using csv format which is great but i cant export more than 50,000 records&lt;/P&gt;&lt;P&gt;I have tried the logic of looping through and exporting 50,000 records at a time and combine them at the end but specifying a number in &amp;nbsp; sysparm_first_row gets ignored and it always results the first 50,000. Is there any other way around this? I am using powershell if anyone has expertise in that area&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:52:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255361#M31071</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255362#M31072</link>
      <description>&lt;P&gt;You can set the export limit to more than 50k.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Navigate to System Properties-&amp;gt;Import Export and set export row limit.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/129183i2F2FB2CB75EA150E/image-size/large?v=v2&amp;amp;px=999" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Reference&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/exporting-data/concept/c_ExportLimits.html" title="https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/exporting-data/concept/c_ExportLimits.html"&gt;Export limits&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:20:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255362#M31072</guid>
      <dc:creator>SanjivMeher</dc:creator>
      <dc:date>2018-01-11T19:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255363#M31073</link>
      <description>&lt;P&gt;Unfortunately that is not an options for us for performance and/or other reasons. Is there a variable that can be used to loop through set of records in the report?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:22:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255363#M31073</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T19:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255364#M31074</link>
      <description>&lt;P&gt;I know that if you do it using javascript gliderecord, you can query in format gr.chooseWindow(initRow, lastRow);&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:33:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255364#M31074</guid>
      <dc:creator>SanjivMeher</dc:creator>
      <dc:date>2018-01-11T19:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255365#M31075</link>
      <description>&lt;P&gt;This is the code for what i am using, if that helps. What you are describing, is that available only in javascript?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;$postparams= @{sysparm_first_row='125000'}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Invoke-webrequest -Credential $credobject -outfile "Path\report.csv" -uri &lt;A title="nstance.com/sys_report_template.do?CSV&amp;amp;jar_report_id=2382383094932840284" href="https://instance.com/sys_report_template.do?CSV&amp;amp;jar_report_id=2382383094932840284"&gt;https://instance.com/sys_report_template.do?CSV&amp;amp;jar_report_id=2382383094932840284&lt;/A&gt; -Method POST -Body $postParams&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:46:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255365#M31075</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T19:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255366#M31076</link>
      <description>&lt;P&gt;Since you are directly calling the report, it will give you result based on export limit, even if you pass the first row parameter.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you are directly querying the table, you may be able to split them. But not sure how you will export it then.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:51:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255366#M31076</guid>
      <dc:creator>SanjivMeher</dc:creator>
      <dc:date>2018-01-11T19:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255367#M31077</link>
      <description>&lt;P&gt;Yea, the data is grabbed from different tables which is why i am using report so i can get data in one report. So that means there is no way to accomplish this is what i am guessing?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 19:55:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255367#M31077</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T19:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255368#M31078</link>
      <description>&lt;P&gt;I think there is not. But wait for response from others. There could be.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;One option could be to query the table and just print everything to an email. But then it becomes difficult for them to go through the data in an email. There could be a limit on the email body as well.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Or query everything from the table directly and try exporting it to csv using code. Not sure how feasible it is.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side" title="https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side"&gt;How to export JavaScript array info to csv (on client side)? - Stack Overflow&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 20:02:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255368#M31078</guid>
      <dc:creator>SanjivMeher</dc:creator>
      <dc:date>2018-01-11T20:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255369#M31079</link>
      <description>&lt;P&gt;Our typical go to for this is to capture and reuse the sys_ids as a filter (where possible). &amp;nbsp; It's an extra step because it may ruin whatever sorting you've already got, but if you're ordering by date it should be pretty much the same.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;- add OrderBy (or OrderByDesc) sys_id to the query&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;- Within the PowerShell (or Bash, for any future readers who may need it) capture the sys_id of the last node that you receive&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;- resubmit your next request adding a "sys_id &amp;gt; *whatever the last sys_id was*" &amp;nbsp; &amp;nbsp; ( &amp;nbsp; sys_id &amp;lt; for OrderByDesc)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;It's not perfect, but hopefully it'll work for you!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 21:23:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255369#M31079</guid>
      <dc:creator>Josh Cooper</dc:creator>
      <dc:date>2018-01-11T21:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255370#M31080</link>
      <description>&lt;P&gt;That sounds helpful, can you give me an example of the URI for this scenario and that will work with report_template_do also right?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;What would the URI look like when we are specifying &amp;gt; sys_id&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 21:45:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255370#M31080</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T21:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export Report in CSV format using a script</title>
      <link>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255371#M31081</link>
      <description>&lt;P&gt;so i tried this&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Invoke-webRequest -OutFile "Path\report.csv" -Uri "&lt;/SPAN&gt;&lt;A title="k-external-small" class="jive-link-external-small" href="https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=b2343242h24324hbg24e2&amp;amp;sysparm_orderby=u_correlation_id" rel="nofollow" target="_blank"&gt;https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=b2343242h24324hbg24e2&amp;amp;sysparm_orderby=u_correlation_id&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;THis gave me 50,000 records arranged by correlation id. Then i tried this&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;Invoke-webRequest -OutFile "path/Report.csv" -Uri "&lt;/SPAN&gt;&lt;A title="k-external-small" class="jive-link-external-small" href="https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=basfoffhfffdss&amp;amp;sysparm_query=u_correlation_id%3Efsdfjsdfkjsdfjsdlfkj&amp;amp;sysparm_orderby=u_correlation_id" rel="nofollow" target="_blank"&gt;https://instance.com/sys_report_template.do?CSV&amp;amp;jvar_report_id=basfoffhfffdss&amp;amp;sysparm_query=u_correlation_id%3Efsdfjsdfkjsdfjsdlfkj&amp;amp;sysparm_orderby=u_correlation_id&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;But this gave me the same 50,000 rown, i used the %3E to specify greater than to get the next 50,000 rows. Any idea what i am doing wrong?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;you can ignore the report id number as i just made up for the sake of the example&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2018 23:45:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/platform-analytics-forum/export-report-in-csv-format-using-a-script/m-p/1255371#M31081</guid>
      <dc:creator>knowledgeenthus</dc:creator>
      <dc:date>2018-01-11T23:45:56Z</dc:date>
    </item>
  </channel>
</rss>

