Buy Now
Sign in

export csv from a filtered list

silvered.dragon , November 20 2019, 11:47
S
silvered.dragon 59
November 20 2019, 11:47 #390056
Hi to all,
I have a list that is filtered through some custom fields and a date picker. The list and filtering are showing fine, now I want to add a button to export in csv the list after is filtered.
The list is provided by a read data function {function:read_disponibilita_ig}
what I tried is to:
  1. create a csv export function "csv_export" with data provider {var:read_disponibilita_ig.[n].read_disponibilita_ig}
  2. create a new event "export"
  3. add to the export event this content {function:read_disponibilita_ig} {function:csv_export}
  4. create a link button that is linking to the export event
this is working but obviously this will export the entire db read function, not the filtered one by the custom fields.
How can I pass the filtered var from one event to another? Or maybe is there a way to run the csv_export function on click in the index event, without start automatically the download when the event is loaded? it's a little difficoult to explain...
S
silvered.dragon 59
November 20 2019, 12:02 #390057
 Answer
Oh my it wa simple, just added into "URL and/or URL parameters" of the link button the keywords that I used for the filtering fields!
J
joaoparao 26
February 26 2021, 11:30 #396062
Hi, Silver.dragon,
can you say exactly what you mean by "the keywords that I used for the filtering fields"? Can you give me an example?
Thanks
Joao