lefty 12/1/2018 | |
Hi. We have two tables in a PHPR system - 'companies' and 'contacts', linked by a unique id. The 'companies' table is our main system table that links to a Bing map to make geographic selections and reflect this on the 'companies' data table. We also have a custom view (a join of contacts and companies) that lists all 'contacts' belonging to 'each company' in the 'companies' table. What we need is: when clicking on the export button following a geographic selection made on the 'companies' table, rather than seeing and selecting from the field list from the 'companies' table, instead we want to show the list of fields from the custom view - the mix of 'contacts' and companies'. Then on clicking export, the output to excel is from the 'list of contacts appended with the company data' from the custom view, (using same unique ids), rather than from the companies table . Hope this helps. If I understood your question. What is the best way to achieve this please in V9.8 and V10 Thanks
|
G
|
graham.barlow@tech4t.com author 12/3/2018 |
Update: Since you have a join statement ( Master / details would work also ) , I would do it the simple way. in the fields section of Contacts . Set Customers field that makes it unique as filter by Contacts in field settings in Contact view . Then in generated output Click a Company left side on list page and click export selected records . This will give you all the contacts / companies that you are looking for to export . Only issue here is you have to export each Company separately . If not design a basic report with view the same way and you will get all at once and then export all to excel . I use 9.8 haven't tried in 10 yet. Hope this helps a little. Not sure what you meant by geographic selection , That may change the whole thing. Is this a map icon your clicking on? explain further if needed.
|
admin 12/3/2018 | |
I'm not sure I follow. You need to export data from a different table or view? Point users to that table or view export page then. |
HJB 12/3/2018 | |
https://www.xlinesoft.com/livedemo/phprunner/livedemo81/Dashboard_map_dashboard.php |
G
|
graham.barlow@tech4t.com author 12/3/2018 |
I'm not sure I follow. You need to export data from a different table or view? Point users to that table or view export page then.
|
G
|
graham.barlow@tech4t.com author 12/3/2018 |
https://www.xlinesoft.com/livedemo/phprunner/livedemo81/Dashboard_map_dashboard.php ...like in the demo above, your custom view (mix of companies and contacts) could appear resp. reflect the BING mapped regional search on the left side. With of course your extra export button in it to go ...
|
HJB 12/3/2018 | |
https://xlinesoft.com/phprunner/docs/_view_as__settings.htm |
admin 12/3/2018 | |
Modify SQL query of the page in question to use JOIN and join the second tables. You can make fields from the joined table only appear on the export page. |
G
|
graham.barlow@tech4t.com author 12/4/2018 |
Modify SQL query of the page in question to use JOIN and join the second tables. You can make fields from the joined table only appear on the export page.
|
admin 12/4/2018 | |
I see what you saying. You sort of need to select master records and export details. |
G
|
graham.barlow@tech4t.com author 12/5/2018 |
I see what you saying. You sort of need to select master records and export details. So then you need to follow my original advice: "Point users to that table or view export page then". Let user select master records and via custom button mimic "Export selected" behaviour of details table. The way you ask this question is very confusing though. Original questions was about selecting fields from details table when in fact it about records in details table. Anyway, this can be done with the help of some custom coding.
|
admin 12/5/2018 | |
The idea of export is that you can import it back. You cannot export master and details together and then import it back, they have different database structure, import program won't be able to tell the difference between master and details records. |