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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Searching CiviCRM contacts by last name?
Pages: [1]

Author Topic: Searching CiviCRM contacts by last name?  (Read 632 times)

Wavesaver

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.1.4
  • CMS version: Drupal
  • MySQL version: ?
  • PHP version: ?
Searching CiviCRM contacts by last name?
May 02, 2013, 12:26:19 pm
I am trying to export all individual contacts from my CiviCRM database.  I am working with a consultant who wants this list.   We have over 14,000 in our database.  Each time I try to export "all individual contacts" the export fails because the list is too big. 

***I want to break this list up and search by last names A-M and N-Z, or something similar.  I need to  know I am exporting every individual contact, over the course of two or three exports.  Any experience with this?  Any advice on how to do this?  Timing wise, I am trying to pull this off by Monday 5-6-13.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Searching CiviCRM contacts by last name?
May 02, 2013, 02:01:58 pm
I have never hit a situation where export fails due to size - are you on a v limited hosting set up?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Guy Iaccarino

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 5
    • Greenleaf Advancement
  • CiviCRM version: 4.4.10, 4.5.4
  • CMS version: WordPress 4, Drupal 7, Drupal 6, Joomla 3
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Searching CiviCRM contacts by last name?
May 02, 2013, 07:18:12 pm
Depending on the make up of your contacts and whether or not you have gender data, you could try splitting it in two by using the male / female radio button in the Advanced Search. That would give you two groups anyway, and hopefully neither of them would be too big.

Or you could use the Search Builder and use the following type of statement to find the last names that begin with specific letters of the alphabet:

Last Name LIKE a% ...AND... Contact Type - 'Individual'
OR
Last Name LIKE b% ...AND... Contact Type - 'Individual'
OR
Last Name LIKE c% ...AND...] Contact Type - 'Individual

and so on...

As you added additional letters that the last names begin with, you could see how many contacts it generates and adjust your search statement accordingly to get the right size exports.

Neither of these is elegant, and I'm sure there is a way to do it all at once through the back end, but depending on your budget and time, one of these should get it done relatively quickly. Then when you have more time you could investigate why you are getting the time out for the entire list.


As an aside, any thought to giving the consultant access to Civi?

I hope this helps.

Guy 

Guy Iaccarino
www.greenleafadvancement.com

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Searching CiviCRM contacts by last name?
May 03, 2013, 03:52:00 pm
an easier 'search' might be to use Search Builder
and use the internal iD to get your first,second, third quartiles - or whoever many chunks you need
if you think your IDs are fairly contiguous

Search 1 = Internal ID < <insert ID that sits around first quartile>
Search 2 = Internal ID <=> <insert IDs for first and second quartile>
etc
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Searching CiviCRM contacts by last name?

This forum was archived on 2017-11-26.