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 (Moderator: Dave Greenberg) »
  • How do I populate Groups using Advanced or Full-text Search or something else
Pages: [1]

Author Topic: How do I populate Groups using Advanced or Full-text Search or something else  (Read 491 times)

KeithM-NZ

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
  • CiviCRM version: 4.4.0
  • CMS version: Wordpress 3.8
  • MySQL version: ?
  • PHP version: ?
How do I populate Groups using Advanced or Full-text Search or something else
February 19, 2014, 11:56:15 pm
I have managed to import data into Civi 4.4.3 successfully. I imported 'Interest Areas' (e.g. Health, Education) into a Custom field (text). Just as plain text e.g. "Health Education Outdoors". Each word is a separate Interest Area.

Now I want to build Groups of all those interested in 'Health', all those interested in 'Education' etc. I thought I'd be able to Search for all the contacts/members who had the particular word in that field and then 'Add to Group'. A bit like using an 'includes' or 'like' rule on a database search.

I've tried Advanced Search but it only selects those records where it is the only word in that custom field, i.e. it only selects when the field value is 'Health', it doesn't select when it's 'Health Outdoors'. I tried a Full-text Search which found the records okay but there wasn't any way to 'Add to Group' > 'Health'.

Is there a way to do this or do I need to think about getting dirty with MySQL, and is that even possible in this case?

Or do I do multiple contact imports, filtering them in Excel first and then adding them to a different group with each import?

Thanks in advance.

 

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How do I populate Groups using Advanced or Full-text Search or something else
February 20, 2014, 04:27:22 am
First thought: I wonder if search builder lets you add a field multiple times, so Interests LIKE health AND Interests LIKE outdoors.

But yeah, you can SQL it. You want to add contact ids to  civicrm_group_contact and match existing columns. Normally I add myself to the group then copy the values into an INSERT ... SELECT to populate further.

This is not "best practice" :)
@xurizaemon ● www.fuzion.co.nz

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: How do I populate Groups using Advanced or Full-text Search or something else
February 20, 2014, 10:32:48 am
hi keith - can you confirm that if you search using the wildcard you still don't get the results you want - ie search for %health%
my expectation in a text field is that %health% should return xhealth healthx xhealthx x health x 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

KeithM-NZ

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
  • CiviCRM version: 4.4.0
  • CMS version: Wordpress 3.8
  • MySQL version: ?
  • PHP version: ?
Re: How do I populate Groups using Advanced or Full-text Search or something else
February 21, 2014, 04:45:40 pm
Pete you're a legend!

A simple solution, works. I can then easily add them to the Smart Group.
I should have thought of a wildcard search, but needed pointing in the right direction. :)

Hope we can meetup soon.

Many thanks.
 

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: How do I populate Groups using Advanced or Full-text Search or something else
February 21, 2014, 04:50:40 pm
nice when it does turn out to be something simple  ;)
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 (Moderator: Dave Greenberg) »
  • How do I populate Groups using Advanced or Full-text Search or something else

This forum was archived on 2017-11-26.