This topic is locked

Exporting specific data

6/1/2018 5:27:00 PM
PHPRunner General questions
P
PrsBen author

Hi ,, if someone could help i appreciate.
i´m trying to figure out how to export some specific data without using search or advanced search.
i have a table with different type of months ( jan,fev,mar)
so in my list appears all records ( jan,fev,mar) when i export all records are exported and i want something like:
a export button with ( example_export.php?Month=jan ) just the month jan will be exported.
so,, i plan to create 12 buttons to export individually ,, is´t possible ? and how ? please.
thanks.
Database :
ClientName | Month
Client1 | Jan

Client2 | Jan

Client3 | Feb
so i need to create a button that export jan.xxx , feb.xxx
xxx = doc,csv,xls etc.

lefty 6/2/2018



Hi ,, if someone could help i appreciate.
i´m trying to figure out how to export some specific data without using search or advanced search.
i have a table with different type of months ( jan,fev,mar)
so in my list appears all records ( jan,fev,mar) when i export all records are exported and i want something like:
a export button with ( example_export.php?Month=jan ) just the month jan will be exported.
so,, i plan to create 12 buttons to export individually ,, is´t possible ? and how ? please.
thanks.
Database :
ClientName | Month
Client1 | Jan

Client2 | Jan

Client3 | Feb
so i need to create a button that export jan.xxx , feb.xxx
xxx = doc,csv,xls etc.


Instead of all those buttons , Use the filter feature on date field in the properies of date in phprunner , click filter Then click interval , Select Last Month , This Month or whatever you need ( You can add an expression to filter dates by clicking on pencil in interval selection and change date settings). Build project . Then just click on the month on the list page to the left . Click export selected records in the gear and your good to go.

P
PrsBen author 6/2/2018

i did this before,,, but everytime i have to load list page and become boredom.
Thats why i plan to use buttons ,, because there is no need to reload any list page .
have another idea to solve this ?
Someone 2 years ago posted in this forum something near that i want.
Posted 11 July 2016 - 06:24 AM

I want to create a button that exports certain records based on search criteria.
something like
'items_export.php?q=(oem_name~equals~ABB)'
how can do i do that?
items_export.php currently exports everything by which search filters are sort.
( but no response )

M
MikeT 6/3/2018

It would be great to have an API method to wrap what the export screen does in code and put it behind a button.

I only looked very superficially at the JS in the list page, but it seemed to me that everything should already be in place to expose & document this.

So something like a function with table/page-id, filter criteria, file format and maybe an array of filelds.
But as always: maybe I'm missing the obvious.
Update: You can see the call that's made for the export by opening the dev-tools in Chrome or Opera (or whatever). Open the Network tab in the dev tools and do an export. You then see the request that was made with the URL and all submitted parameters. I don't know if you there's a possibility to use filter criteria of some sort for the argument "records".

Sergey probably needs to chime in here before I post more bad advice...;-)