Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
You can use script to download a file or blob of data and force its name. See the attached screenshot where I download all the records in the formula function reference and give it a name myreport.csv:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=651
So all you have to do is bind this script to a button and arrange to pass the name you want for the file.
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=651
So all you have to do is bind this script to a button and arrange to pass the name you want for the file.
_anomDiebolt_
7 years agoQrew Elite
The variable csv is just a string with newlines separating each row.
This will probably work:
This will probably work:
var csv2 = csv.split('\n').slice(1).join('\n');Very simple console test:
download("myuniquefile.csv", csv2);
csv="a,b\n1,2\n3,4"
"a,b
1,2
3,4"
csv.split('\n').slice(1).join('\n');
"1,2
3,4"