db read and csv export

Export data from multiple database tables to CSV using ChronoForms.

Overview

The CF multi-table database read function incorrectly places the second table's data in a sub-array, preventing it from being exported.
Modify the array merge code to correctly combine the data from both tables before the CSV export process.

Answered
ChronoForms v5
md mduda 19 Jul, 2017
I have a simple form - just a submit button. I'm trying to download two tables - currently trying to do so with CSV Export.

When I use the db read, select only one table, and set the model id (mine is set as GSheet). I also set the data path in the csv export same as the model id. I do not select any tables. The data from the single table shows. Great...

However, when I enable the the relations, and try to connect the 2nd table. I get nothing in the data. Is there something else I need to do when enabling relations on the db read?

[attachment=79831_20170719234148_chrono-enable-relation-png.png][/attachment]

Even though the id's are the same on both tables, I've tried it with and without the join condition...still nothing.

[attachment=79831_20170719234300_chrono-enable-relation-join-png.png][/attachment]

What am I missing?
md mduda 20 Jul, 2017
Answer
1 Likes
Fixed it. Completely forgot that there was a bug in the CF multi table read, where it puts the 2nd table in a sub array. Modified the array merge code you provided for me last year Bob.

Thanks.
This topic is locked and no more replies can be posted.