Export Report in CSV format using a script

knowledgeenthus
Kilo Contributor

Hi,

I have figured out a script to export report using csv format which is great but i cant export more than 50,000 records

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   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

10 REPLIES 10

SanjivMeher
Mega Patron

You can set the export limit to more than 50k.



Navigate to System Properties->Import Export and set export row limit.


find_real_file.png



Reference


Export limits



Please mark this response as correct or helpful if it assisted you with your question.

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?


I know that if you do it using javascript gliderecord, you can query in format gr.chooseWindow(initRow, lastRow);



Please mark this response as correct or helpful if it assisted you with your question.

This is the code for what i am using, if that helps. What you are describing, is that available only in javascript?



$postparams= @{sysparm_first_row='125000'}



Invoke-webrequest -Credential $credobject -outfile "Path\report.csv" -uri https://instance.com/sys_report_template.do?CSV&jar_report_id=2382383094932840284 -Method POST -Body $postParams