Chronoforms v6 is an awesome tool!
I am trying to export data that are saved from a form into a table to a csv/xls file, but the exported file is empty.
Following the advice written here (https://www.chronoengine.com/forums/posts/t104177/), in the Load area, I have used a ReadData action with model name Data1. I am returning all matching records without any criteria. I also print all matching records (in a Display action) with custom html code and a Loop action.
In the form there is a checkboxes field named "answers", so I used "answers/json" in the Special Fields of the ReadData action.
I have a submit button in order the file to start downloading thus, in the Submit area, I have placed the CSV action with:
Data provider: {var:read_data1}
Action: Download
Delimeter: ,
Filename: csv1.csv
and Titles:
aid.ID
firstname:FirstName
lastname:LastName
answers: Answers
The only export I get is a csv file with Titles but no data (table records). Could you please send me any advice.
Thank you.
Best regards,
I am trying to export data that are saved from a form into a table to a csv/xls file, but the exported file is empty.
Following the advice written here (https://www.chronoengine.com/forums/posts/t104177/), in the Load area, I have used a ReadData action with model name Data1. I am returning all matching records without any criteria. I also print all matching records (in a Display action) with custom html code and a Loop action.
In the form there is a checkboxes field named "answers", so I used "answers/json" in the Special Fields of the ReadData action.
I have a submit button in order the file to start downloading thus, in the Submit area, I have placed the CSV action with:
Data provider: {var:read_data1}
Action: Download
Delimeter: ,
Filename: csv1.csv
and Titles:
aid.ID
firstname:FirstName
lastname:LastName
answers: Answers
The only export I get is a csv file with Titles but no data (table records). Could you please send me any advice.
Thank you.
Best regards,
Set data provider to
{var:read_data1.[n].model}
Thank you very much healyhatman!
Along with your advice I moved both read_data and CSV actions to be together either in the Load or the Submit section and now my csv/xls contains data.
So, the csv file is ok but the page seems to be in processing (processing circle in the middle of the screen does not go away) although the file is completely created and downloaded.
I 've tried a message or a stopper action right after csv action but the page is in process without ending.
Any advice here?
Thank you
Along with your advice I moved both read_data and CSV actions to be together either in the Load or the Submit section and now my csv/xls contains data.
So, the csv file is ok but the page seems to be in processing (processing circle in the middle of the screen does not go away) although the file is completely created and downloaded.
I 've tried a message or a stopper action right after csv action but the page is in process without ending.
Any advice here?
Thank you
Check console
This topic is locked and no more replies can be posted.