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) »
  • Adding relationship - Status - Too many matching results
Pages: [1]

Author Topic: Adding relationship - Status - Too many matching results  (Read 5613 times)

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
Adding relationship - Status - Too many matching results
May 23, 2008, 04:05:17 pm
Hey - because we can't see a better way of handling organisations with lots of branches other than putting the branch after a hyphen in Org Name we have some Orgs that have 50+ Org Names (eg OrgX - A Branch; OrgX - B Branch etc)

When I then try to 'add relationship' from the Individual to the Org'n and put "Org X" or even "Org X - A Branch" in the Find Target Contact field, even when the Field shows me the Org/Branch I want, it tells me

status
    Too many matching results. Please narrow your search by entering a more complete target contact name.

I can set up the Relationship from the Org'n but it is a pain in terms of workflow. Any suggestions or can it be fixed if you consider it a bug. cheers
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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Adding relationship - Status - Too many matching results
May 25, 2008, 12:53:17 pm
I just verified this on demo as well. The problem is that even though an exact matching contact is selected in the Find Target Contact "comboBox" - clicking "Search" does the wrong thing. It should just return the single matching row in this case.

I've posted a bug fix for this for 2.1:
http://issues.civicrm.org/jira/browse/CRM-3150

I suspect this fix will be back-portable by chris ... so might want to have him watch that issue.
Protect your investment in CiviCRM by  becoming a Member!

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: Adding relationship - Status - Too many matching results
May 26, 2008, 02:40:17 am
Thanks Dave - I'm watching.
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

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Adding relationship - Status - Too many matching results
October 21, 2008, 04:41:11 pm
In unclosed this issue as it's still showing up in v2.1.1
Comments in Jira.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding relationship - Status - Too many matching results
October 21, 2008, 05:37:42 pm
There seems to be a bug, so i have reopened the issue.

thanx

Kurund
Found this reply helpful? Support CiviCRM

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Adding relationship - Status - Too many matching results
November 14, 2008, 03:13:01 am
Another related problem is that when you search for "OrgX - branch of ZZZ" it will not only find all the OrgX, but also all the organisations that contains "branch" or "-" or "of".

Basically, as soon as you're trying to search a name of organisation that contains a "stopword" like "a" "of" "association"... you're out of luck and flooded with half of the db.

My quick fix (until we got a proper fulltext search)
Code: [Select]
+++ CRM/Contact/BAO/Query.php   (working copy)
@@ -2126,7 +2126,8 @@
                 $name   = substr( $name, 0, -1 );
                 $pieces = array( $name );
             } else {
-                $pieces =  explode( ' ', $name );
+                $pieces = array( $name );
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Adding relationship - Status - Too many matching results
February 11, 2009, 04:44:49 am
I just ran into this same error message in 2.1.4.  I don't know if it's the same source, but I'm posting here since I found this thread by searching for the error message.  Here's the situation, which I just verified on the Drupal demo.

Task: Add a child relationship to a record.

In previous versions, if both parents were in the db, I could search for surname, such as Roberts and then check both parent's records in the results, and add both relations at the same time.  In the current version, if I take any other action besides waiting for the widget to display the list of possible matches and searching for that exact record, then I get the error message:

Too many matching results. Please narrow your search by entering a more complete target contact name.

This will occur on the demo whether you use roberts or roberts%.  There are currently 9 matches in the demo database, which should not be too many matching results.  This works properly from the Find Contacts screen but not on the New Relationship screen.
Lead Developer, C3 Design.
Twitter: @FatherShawn

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding relationship - Status - Too many matching results
February 11, 2009, 05:16:51 am
I tried on http://drupal.demo.civicrm.org/civicrm/contact/view/rel?cid=105&action=add&reset=1
with Child of relationship, for roberts, it gave me 6 records.

So seems to be working fine..

Kurund
Found this reply helpful? Support CiviCRM

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Adding relationship - Status - Too many matching results
February 11, 2009, 07:48:52 am
Hi,

The usability issue (beside the obvious problem when you have too many) is that you first narrow down in the autocomplete to one contact and click on that contact, to go to a second step that lists all (often only the one you just clicked on), that you have to select AGAIN to create the relationship.

If you select one contact in the autocomplete, it should skip the list and directly let you create the relationship.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Adding relationship - Status - Too many matching results
February 11, 2009, 09:42:14 am
Quote from: xavier on February 11, 2009, 07:48:52 am
The usability issue (beside the obvious problem when you have too many) is that you first narrow down in the autocomplete to one contact and click on that contact, to go to a second step that lists all (often only the one you just clicked on), that you have to select AGAIN to create the relationship.

If you select one contact in the autocomplete, it should skip the list and directly let you create the relationship.

I agree with this - EXCEPT for the fact that the current autocomplete widget doesn't show any identifying details for the selected contact other than the sort name (last, first). For installs w/ larger databases it is quite likely that there may be multiple individuals with the same last, first names (or organization records w/ the same organization name but in different locations). The search result row shows (hopefully) enough additional info (city, state, phone, email...) to confirm that the user has the contact they want.

We could potentially fix this by displaying that info (read-only) next to the autocomplete type-ahead box as records are selected. Would be interested in others thoughts on this.
Protect your investment in CiviCRM by  becoming a Member!

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Adding relationship - Status - Too many matching results
February 11, 2009, 10:48:11 am
Quote from: Kurund Jalmi on February 11, 2009, 05:16:51 am
I tried on http://drupal.demo.civicrm.org/civicrm/contact/view/rel?cid=105&action=add&reset=1
with Child of relationship, for roberts, it gave me 6 records.

So seems to be working fine..

Kurund

I can narrow this down some.  If you type "roberts" and hit return then you will get the error message.  If you type roberts, wait for the autocomplete widget to display the list, click in a vacant area to make the list go away because it is covering the "Search" button and then click the button, you get the multiple results.

Shouldn't one be able to simply type the name and hit return?
Lead Developer, C3 Design.
Twitter: @FatherShawn

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Adding relationship - Status - Too many matching results
November 12, 2009, 03:09:07 am
Our clients still find Add Relationship very problematic in Civi 3.0.1 - the same issue as reported by PeterD in the original post. One client has over 400 organisations with "Bolton" in their name. When trying to add a relationship from an individual to their employer, let's say Bolton XYZ, typing XYZ in the widget finds 3 matching contacts in the drop-down. Clicking on Bolton XYZ in the drop-down and clicking Search results in:

"Too many matching results. Please narrow your search by entering a more complete target contact name."

However clicking on Salford XYZ in the drop-down, then Search, gives a list of 9 candidate contacts, with names matching Salford or XYZ.

So it appears the reason why clicking Bolton XYZ + Search fails is that a search is then done on Bolton or XYZ, which retrieves over 400 orgs. This is clearly incorrect - having selected a single contact, we have the id and no further search should be carried out and certainly not this search.

As a workaround, typing "Bolton XYZ" (with quotes) in the widget retrieves nothing in the drop-down, but clicking Search then retrieves the single matching contact.

Dave J

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: Adding relationship - Status - Too many matching results
November 12, 2009, 12:34:03 pm

created an issue for this:

http://issues.civicrm.org/jira/browse/CRM-5385

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

ngingras

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
Re: Adding relationship - Status - Too many matching results
March 29, 2010, 11:08:26 am
This issue seems to still be unresolved as of 3.1.3.

http://issues.civicrm.org/jira/browse/CRM-6033


Same error as before :(

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: Adding relationship - Status - Too many matching results
March 29, 2010, 11:43:47 am

can you please ask us to reopen an old issue rather than creating a new issue in the future

i've cleaned up the below multiple issues

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) »
  • Adding relationship - Status - Too many matching results

This forum was archived on 2017-11-26.