CSV export from List Module

I have a page defined by a Joomla article with four loadposition blocks and there are four list modules - one for each position. Each block presents data from a separate Fabrik table. Each list module has a prefilter to select the user whose data will be displayed.

Access to this page is via a list link plugin that defines a URL parameter with the user's user_id (thanks to a recommendation from Robbie). So the list module prefilters use the url parameter (e.g. {cid}) to show data for the one specific user. This works well.

My issue is that when on this page, doing a CSV export results in zero records to export even though there is a single or multiple records listed.

If I change the list module prefilter from (eval'd: return '{cid}' ) to (eval'd: return 'xxxxx'; where xxxxx is the user_id) then the CSV works as expected. Also the prefilter set to (text: xxxxx) makes the CSV work. It seems anytime I use the {cid} URL parameter, the CSV export finds no records.

I've tried adding a custom query string (user_id={cid}) to the list's CSV config, but that does not help.

Am I using the custom query string incorrectly? Or, is there something about my prefilter that needs to change?
 
It seems the CSV export doesn't take/replace an URL param directly, it's the same with such a prefilter in a menu item or in the list directly: list showing filtered record, CSV is empty.
But it should do with
Custom QS: &cid={cid}
in CSV settings.
 
Thanks, troester. Adding &cid={cid} did work. I was expecting user_id={cid} would have been the answer, but maybe using cid rather than user_id is necessary because it has to match the way the prefilter is defined. Or, it could also have to do with the fact that I set the custom QS field to "user_id={cid}" rather then "&user_id={cid}". I was presuming the first '&' would be set by Fabrik. So much for assumptions. Still it seems that maybe the cid= versus user_id= was the clincher. I very much appreciate the rapid help.
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top