I have a form that pulls data from a survey. The user can select a question from the dropdown, click a submit button, and see the list of respondents and their answers for the selected question.
I want to be able to create the option to download that list to a CSV after I see it. I've created a toolbar button to do that. When I choose the question, I see the results I expect, but when I click the button, the spreadsheet downloads, but it is empty save for the characters  in cell A1.
My original attempt was, in the read_data option for the download, to use the same filter I used in the event that used the read_table for the displayed list. I make that selection via a dropdown with the name "choose_question", so my filter for the read_data for the list view is answer:{data:choose_question}.
I've tried several alternatives, all either display those three characters or a completely empty spreadsheet.
One scenario I tried was to put the read_data function and the download function into the event that displays the result, so that the spreadsheet downloaded at the same time the selected list displayed.
That worked.
So it would seem that the dropdown selection is available only for the results of clicking the submit button.
Is there a way that I can accomplish the result I want?
Thanks!
I want to be able to create the option to download that list to a CSV after I see it. I've created a toolbar button to do that. When I choose the question, I see the results I expect, but when I click the button, the spreadsheet downloads, but it is empty save for the characters  in cell A1.
My original attempt was, in the read_data option for the download, to use the same filter I used in the event that used the read_table for the displayed list. I make that selection via a dropdown with the name "choose_question", so my filter for the read_data for the list view is answer:{data:choose_question}.
I've tried several alternatives, all either display those three characters or a completely empty spreadsheet.
One scenario I tried was to put the read_data function and the download function into the event that displays the result, so that the spreadsheet downloaded at the same time the selected list displayed.
That worked.
So it would seem that the dropdown selection is available only for the results of clicking the submit button.
Is there a way that I can accomplish the result I want?
Thanks!
You'll either need to store the data in session or reread it
This topic is locked and no more replies can be posted.