JasonJohnson2
6 years agoQrew Cadet
Save as a spreadsheet of a report from a table from the form of another table.
I found a post similar that allows a save a spreadsheet from a button and the code is from Dan Diebolt (thanks Dan). I need to have the button in a form from a Projects table and save a report from a billing table. The code as is will save the report but not filtered to the specific project. Every variation I use to insert the record id#/ related project to filter with code fails. Either the button does nothing or it saves 7000 lines of code from QuickBase. I did submit to product feedback to make Automations to perform a save as spreadsheet function, go out and vote for it. (Automation for Save as Spreadsheet)
Yes I can teach the users to go to a report in a table and download but a button in the project would be so much better.
Any thoughts on how to add the filtering?
Yes I can teach the users to go to a report in a table and download but a button in the project would be so much better.
Any thoughts on how to add the filtering?
"<a href=# class='Vibrant Success' onclick=''>Download</a>"
function download(filename, content) {
var blob = new Blob([content]);
var a = document.createElement('a');
a.href = window.URL.createObjectURL(blob);
a.download = filename;
a.style.display = 'none';
document.body.appendChild(a);
a.click();
}
var dbidTable= 'dbidTable';
var qid = '1';
var output = 'output.csv';
var url = '${dbidTable}?a=q&qid=${qid}&opts=csv';
$.get(url, function(csv) {
download('${output}', csv);
});