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) »
  • "Advanced Search returns results that match ALL items you enter/check" ?
Pages: [1]

Author Topic: "Advanced Search returns results that match ALL items you enter/check" ?  (Read 1049 times)

brunodbo

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
"Advanced Search returns results that match ALL items you enter/check" ?
July 10, 2009, 07:16:53 am
The CiviCRM documentation states the following:

"Unless otherwise noted, filling out more than one field in the Advanced Search window will return results that match ALL items you enter or check. For example, searching on the name "Jones" and Zip Code "02134" will show only those contacts that match BOTH items."
(http://wiki.civicrm.org/confluence/display/CRMDOC/Advanced+Search)

Is it possible to do a search where results are returned that match one of the selected/entered items (instead of results having to match ALL results), or would this require a hack? I'm on CiviCRM 2.0.5.

ctarascio

  • I post frequently
  • ***
  • Posts: 334
  • Karma: 30
    • American Friends Service Committee
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.20
  • PHP version: 5.3.13
Re: "Advanced Search returns results that match ALL items you enter/check" ?
July 10, 2009, 07:38:41 am
Hi,
If I understand you correctly, you want to be able to search for "this" OR "that" and not just "this" AND "that". If this is what you want I believe it is possible to do this using search builder. Note though, that I tested this on 2.2.5, so I don't know if there is something different with search builder in 2.0.5.

--Enter your first search criteria in the "Include contacts where" section.
--Then, enter the second set of criteria in the "also include contacts where" section.
--The results returned should include contacts that meet either criteria.
--Whereas if you enter both sets of criteria in the "include contacts where" section the results will only include contacts that meet
   both sets of criteria

Does this help?

Cynthia


brunodbo

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
Re: "Advanced Search returns results that match ALL items you enter/check" ?
July 10, 2009, 08:23:24 am
Thanks for the quick reply.

I had found the search builder, but I was wondering if there was a solution where I could offer this functionality (the 'OR' search) to non-tech-savvy users, who don't necessarily understand how to build a search query themselves.

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: "Advanced Search returns results that match ALL items you enter/check" ?
July 10, 2009, 08:28:17 am

if you only want to search on a limited number of fields, consider building a custom search. You can then expose the AND/OR functionality to the user. alternatively you can also try the views2 integration depending on your needs

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • "Advanced Search returns results that match ALL items you enter/check" ?

This forum was archived on 2017-11-26.