Export to CSV or PDF

jo-ka

Member
Hello,

Sorry to bring this discussion to here, but I'm having a problem as this one being discussed on this thread:

http://fabrikar.com/forums/index.php?threads/csv-export-not-working.48612/#post-253681

The question is that I use a pre-filter on the list, based on an SQL query, which receives data from an input form, as suggested here:

http://fabrikar.com/forums/index.php?threads/unavailability-list.48876/

And so, my pre-filter is set like this:

View attachment 17106

The result, after the variables are passed by the form with the redirect plugin is this:

View attachment 17107

But when I try to export to CSV I get this error ( In English, There's no records available to export to CSV):

View attachment 17108

Also the PDF returns empty...

View attachment 17109

I was checking if I have this commit but it looks like it's OK.

https://github.com/Fabrik/fabrik/commit/4cbe63edec3bacefbd3c8baaa71729c8257a38c7

Am I doing something wrong?

Thank's in advance.
 
For the CSV, have you tried adding the "Custom QS" (query string), under the List's Publishing -> CSV settings? The tooltip explains using it for exactly what you are doing (pre-filtering using query string args).

For PDF, I think I'd have to add a similar feature, to preserve the addition query string args in the PDF link.

The problem is of course that your additional query string args simply aren't automatically carried through to links within the list. Query strings are only intended for the page being loaded, and never automatically get added to links generated on that page.

-- hugh
 
Huuummm... I didn't knew about this. Thanks for the tip

So, I've tried like this:

&di={___di}&df={___df}

{___di} and {___df} are the element names of the form which I'm using to filter the list.

And it didn't worked, but if I force a date like this:

&di=2018-05-08&df=2018-05-08

It works.

Can this be related with the 00:00:00 part of the date, or am I doing something wrong here?

Thanks in advance.
 
My mistake!
The solution is to have the QS like this:

&di={di}&df={df}

Works perfectly. It would be great if we could get this working on PDF too.

Thanks Hugh.
 
I did clear the browser and Joomla cache, yes, but didn't made a full Github update.
Shall I?
 
OK, So I've made a full update from Fabrik and the error has now gone.

I understand that If I want to change something I need to do it on the new file fabrik-csv-filename.php.

So, how can I add the variables {di} and {df} from the custom CS &di={di}&df={df}?

Thanks in advance.
 
OK, looks like I need to do a little more work on this. The additional QS args are making it through in the Javascript to the initial calls to build the CSV, but not to the part that downloads the file.

I'll let you know when I've got it going.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top