CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Exporting from a Proximity Search
Pages: [1]

Author Topic: Exporting from a Proximity Search  (Read 836 times)

pramsey

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal
  • MySQL version: 5.2
  • PHP version: 5.5
Exporting from a Proximity Search
February 27, 2011, 10:20:25 pm
When exporting from a proximity search, the process skips the field selection stage and goes straight to exporting a table, with simple record types (name, address, etc). Is there something I need to add to a custom search (like Proximity) to allow the Export functionality to be a little more full featured?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Exporting from a Proximity Search
February 28, 2011, 07:47:33 am

The custom search code does not allow "selecting fields" to export (it makes the code a lot more complicated)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pramsey

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal
  • MySQL version: 5.2
  • PHP version: 5.5
Re: Exporting from a Proximity Search
February 28, 2011, 10:13:49 am
Fair enough. Where would I muck with the code to customize my export function and choose which fields I want to come out in the default extract?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Exporting from a Proximity Search
February 28, 2011, 11:15:52 am

all custom searches use the default export list

CRM/Contact/BAO/Query.php, function defaultReturnProperties

u'll need to modify and extend that

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pramsey

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal
  • MySQL version: 5.2
  • PHP version: 5.5
Re: Exporting from a Proximity Search
March 01, 2011, 08:41:21 pm
Hm, that function lists about 20 columns, including the ones I'm interested in, but all I get from an export are sort_name, street_address, city, postal_code, state_province and country. Is there something else in play?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Exporting from a Proximity Search
March 01, 2011, 08:49:56 pm

oops, my mistake

The custom search decides what columns it will export, so u'll need to fix the code here:

CRM/Contact/Form/Search/Custom/Proximity.php


lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pramsey

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal
  • MySQL version: 5.2
  • PHP version: 5.5
Re: Exporting from a Proximity Search
March 01, 2011, 09:37:00 pm
Bingo, thanks so much, that was the pointer I needed. Usable hack in place! :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Exporting from a Proximity Search

This forum was archived on 2017-11-26.