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) »
  • Autocomplete-Select Filtered By Group Problem
Pages: [1]

Author Topic: Autocomplete-Select Filtered By Group Problem  (Read 746 times)

drumma777

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
    • Global Christian Ministry Forum
  • CiviCRM version: 4.2.6
  • CMS version: Wordpress 3.4.2
  • MySQL version: 5.1.63-cll
  • PHP version: 5.3.10
Autocomplete-Select Filtered By Group Problem
November 12, 2012, 11:57:53 am
I have a custom field that is an "Autocomplete-Select" box and it's filtered by a specific group.  So the way I want the user to be able to use this is to type or select from the list a district or region they are involved with.  This field is fully functional for me the admin and anyone who is an administrator.  For everyone else, this field is unable to reference the group of districts/regions I have in place.  Let me explain the structure a little which may explain why this isn't working.  I added a new "Contact Type" using "Organization" as the base contact type and named it "District/Region".  I then created new Organizations of the type "District/Regions" such as "Pennsylvania", "VA, MD, DE", "Texas", "Central FL", and so forth.  Each District/Region (organization) is part of a custom group named "District/Region" and this is the group that I am filtering the "Autocomplete-Select" box with.  This is probably way too convoluted but my goal is to then build relationships with the members who are living in one of these districts to their current district coordinator responsible for that district/region.  Does this make any sense?  If there is an easier or better way, I would love to hear some ideas!!  :)  Also, if someone can explain why all of this seems to work just fine for an admin, but not a regular user, that would be very helpful.

Thanks SO MUCH!

Kindly,
Rick Monyer

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Autocomplete-Select Filtered By Group Problem
November 12, 2012, 01:07:37 pm
Rick - Pretty sure the problem is that the autocomplete functionality is "protected" via a special permission: "access contact reference fields" - and that in the current release of CiviCRM that permission is restricted to administrative users in Wordpress sites. The upcoming 4.3 release will give Wordpress sites the same ability to granularly control all the CiviCRM permissions - which will solve your problem. However that release isn't due to hit alpha until December.

Protect your investment in CiviCRM by  becoming a Member!

drumma777

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
    • Global Christian Ministry Forum
  • CiviCRM version: 4.2.6
  • CMS version: Wordpress 3.4.2
  • MySQL version: 5.1.63-cll
  • PHP version: 5.3.10
Re: Autocomplete-Select Filtered By Group Problem
November 13, 2012, 06:55:36 am
OK, thanks for that insight Dave!  I may just have to rethink this end of things and go at it a different way.  Is there a way to setup rules to automatically add people to specific groups based on a specific value in a custom field?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Autocomplete-Select Filtered By Group Problem
November 13, 2012, 07:55:48 pm
How about just creating a "smart group" (saved search) for each region. So folks just pick their region and that puts them in the associated smart group.
Protect your investment in CiviCRM by  becoming a Member!

drumma777

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
    • Global Christian Ministry Forum
  • CiviCRM version: 4.2.6
  • CMS version: Wordpress 3.4.2
  • MySQL version: 5.1.63-cll
  • PHP version: 5.3.10
Re: Autocomplete-Select Filtered By Group Problem
November 15, 2012, 05:41:40 am
Quote from: Dave Greenberg on November 13, 2012, 07:55:48 pm
How about just creating a "smart group" (saved search) for each region. So folks just pick their region and that puts them in the associated smart group.

Dave, I like the idea and I started to implement it, but I have a question.  I figured out how to first of all create a Smart Group and I verified that when I look at all the contacts "associated" with that Smart Group it is correct.  But I was confused to learn that those contacts are not actually ADDED to that group if I were to open a contact and view their Current Groups.  So my question is how do I automatically add them to this Smart Group?  I also noticed when I view the contacts "in" this Smart Group, their Status is "Smart" unless I manually add them and then the Status becomes "Added".  NEVERMIND.  ::)  I answered my own question after trying it out a little more.  I verified that whether the contacts in the Smart Group are Smart or Added, they still are included in the queries for that group and I see no real benefit to automatically add a contact to a Smart Group if they are already associated with that Smart Group.  I realize this may make absolutely no sense unless you understand Smart Groups!   :P

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Autocomplete-Select Filtered By Group Problem
November 15, 2012, 03:52:50 pm
Your confusion is "understandable". The fact that a contact is included in one or more smart groups is not displayed in the contact's Groups tab (in current stable release - 4.2 - and earlier). But they are indeed "in" that group. You can also manually add folks to a smart group who don't meet the search criteria (i.e. NY Constituents is everyone who lives in NY - and I also want to include Jane Smith who happens to not live in NY). AND you can manually remove / folks can unsubscribe from a Smart Group (which means they are NOT in the group even tho they DO match the search criteria.

Starting with the upcoming 4.3 release, smart groups WILL be listed in each contact's Groups tab as well which should help prevent this type of confusion in the future.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Autocomplete-Select Filtered By Group Problem

This forum was archived on 2017-11-26.