Page 1 of 1

export related records

PostPosted: Tue Dec 04, 2007 1:16 pm
by rolandsnowe
I've searched around and found one post referencing the export related records action. My question is, does this export the main table along with related table information, and if so, how do I enable it in Dataface? I can export the main table data fine, but I don't see an icon for export with related data? Am I missing a step?

Also, when trying to apply the fix from a previous post:

url = "{$this->url('-action=export_csv&--related=1')}"

change it to

url = "{$this->url('-action=export_csv')&--related=1}"


I get a parsing error. Any suggestions?

PostPosted: Tue Dec 04, 2007 4:58 pm
by shannah
Hi Roland,

Must have been a typo in the post you checked.

you should be changing it to:

url = "{$this->url('-action=export_csv')}&--related=1"

turning it on

PostPosted: Wed Dec 05, 2007 1:28 pm
by rolandsnowe
thanks for the quick help. so your fix worked, in as much as there are no errors in the application when i make the change.

so what i am not sure about is, where this functionality is supposed to be accessed. for exporting a table, i have the icon that runs the export to csv for that table, however if i try to replace '-action=export_csv' with '-action=export_csv_related' in the url i get a fatal error:

No template found for action 'export_csv_related'

are there intermediary steps that i need to take in order to implement this functionality?

PostPosted: Wed Dec 05, 2007 1:37 pm
by shannah
if i try to replace '-action=export_csv' with '-action=export_csv_related' in the url i get a fatal error:


You should keep it as just export_csv. The export_csv_related action is really just used for the links so that the link will appear in the upper right on the related list. It directs to the export_csv action with the extra parameter to indicate that it is for a relationship.