CSV Export different settings for same list - ideas?

ontarget

Active Member
Hi
I have a list which i need to allow exporting for different joomla groups.
Some user groups get to see some elements included in the CSV export whilst others dont.
Apart from duplicating the list and setting CSV export individually for it is there another method?

The Fabrik CSV menu type seems to lead to an error (plus you cant customise it to overrride the list settings)
Code:
0
Call to undefined method FabrikController::getError()

I'm aware of these methods in F3
1. https://www.fabrikar.com/forums/index.php?wiki/export-to-csv-customizing/
2. https://fabrikar.com/forums/index.php?wiki/export-to-csv-without-using-dialog/

Method 2 (using menu - System/URL) e.g
index.php?option=com_fabrik&view=list&listid=2&format=csv&download=1
Shows a json type output but no actual csv file is triggered for download.

JavaScript:
{"total":311,"count":100,"file":"user_registration-export.csv","limitStart":0,"limitLength":100}

I havent tried method 1 as the code in the example looks deprecated.

I'm ok with duplicating lists if there is no alternative - its just that there are so many elements to troll through in the backend when each list i'm duplicating has 50 elements....
 

Attachments

  • Screenshot 2024-10-25 at 10.53.31.png
    Screenshot 2024-10-25 at 10.53.31.png
    388.4 KB · Views: 103
I am using Fabrik 4.2 2024-06-26
and joomla 4.4.8 -
All database table structures are up to date.
Screenshot 2024-10-31 at 10.15.15.png
 
FYI That system i screenshotted is not a fresh f4.2 install but upgraded from f3 so most likely didn't remove / update the relevant files /dirs?

I checked a system which i installed 4.2 from fresh and I cant see the CSV option in the menu.
 
Ok, yes. I assume this file is not removed during an update.
So after @achartier fix it may be working.

But as far as I remember it has no options, so doing nothing more than the CSV export button in the list?
 
I just pushed a commit that should fix the error reported above. Update from git to get it.
I thought this one.

But I tried to re-add the xml on my site (both, from F3 and the one removed in the commit), the menu can be added but then it's crashing.

Or are you able to use it after the Git update?
 
So as the menu item was never working before I would suggest to remove the xml during installation.

@ontarget
On a F4 site I have used a link like
my-domain/index.php?option=com_fabrik&view=list&listid=13&resetfilters=0&incraw=0&incfilters=1&format=csv&csv_export_step=2000&excel=1&fields[person___vorname]=1&fields[person___name]=1&fields[person___mail_buroverzeichnis]=1&lang=de

to export 3 fields of all (up to 2000) records into Excel.

You can e.g. create a custom list template, edit default_buttons.php and add those csv links for different user groups.
 
But as far as I remember it has no options, so doing nothing more than the CSV export button in the list?
Correct it doesnt do anything apart from export the CSV as per the list settings.
It would be great to be able to do prefilters and element selection for custom CSV exports on the menu.
 
To do prefilters: This is list's prefilter settings (you can add different ones for differnet groups with "Apply to".
For element selection see post above.
 
Back
Top