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 Profiles (Moderator: Dave Greenberg) »
  • map only select part of my contacts
Pages: [1]

Author Topic: map only select part of my contacts  (Read 942 times)

DicE

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5.1
  • CMS version: Drupal 7.latest
  • MySQL version: 5.5.25a
  • PHP version: 5.3.15
map only select part of my contacts
February 10, 2013, 01:43:11 pm
Hi,

I'm looking for a way to limit the number of contacts that are returned by a search profile so it only shows the contacts which are participating to an event.

in more detail:
I need to setup a registration page for our annual garage sale. For this I have created an extra location (e.g. simular to the 'home' and 'billing' location which are in the system by default) because not every participant will host his garage sale on his own property.
So my event registration has 2 profiles: one with info related to the person (including the home address, email; name etc) and the second profile will collect the 'street and number', 'postalcode' and 'place' for the actual garage sale location.

I would like to offer interested people to oppertunity to look on our site for already registered participants. By list and also by tagging the locations on a google map.

My first attempts I actually added custom fields to collect the location of the salebooth. I added those fields to the participant for the garagesale event. But I could not get it to work as described here: http://wiki.civicrm.org/confluence/display/CRMDOC42/Linking+Profiles#LinkingProfiles-MappingaGroupofContactsusingaProfile
I would always get an error saying the profile with GID=3 could not be found or no search something was setup. Although the profile had mapping activated and the profileID was 34.

After changing the address info and using an extra location instead of the custom fields, I'm having more luck with the search page (although I had to change the URL from civicrm/profile/map?reset=1&gid=PID&force=1&map=1 to /civicrm/profile/map&reset=1&gid=PID&force=1&map=1 in order get it to work (could be a typo in the documentation?)

Problem now is that the search page returns ALL my contacts whether or not they are participating in the garage sale. I believe this is because the custom profile I use now only has contact fields. But since I can't setup a profile with fields from 2 different fieldtypes (contacts and participants) I don't really know how I can limit the returned list of contacts to only those that are actually participating.

Can anybody please help me here?

DicE

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: map only select part of my contacts
February 10, 2013, 03:46:17 pm
can you make a smart group of your participants - and then settings for the profile can 'limit to group' ie only show those who are in the group (from memory)
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

planetwebb

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28 / Drupal 7.34
  • MySQL version: 5.5.34-cll-lve
  • PHP version: 5.3.22
Re: map only select part of my contacts
February 10, 2013, 06:29:47 pm
I did the same thing for our neighborhood last year, a big hit!

I created an event for the yard sale and profile for the registrant.  In our case, the homeowner must register their own property (it doesn't keep others from combining their sales at one location).  The registration adds them to a smart group that I can easily display a location map of those in the group.

DicE

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5.1
  • CMS version: Drupal 7.latest
  • MySQL version: 5.5.25a
  • PHP version: 5.3.15
Re: map only select part of my contacts
February 10, 2013, 11:00:09 pm
oh right! dummy  ::)
I interpreted that option different which is why I did not try it.

I thought it was used to limit the results of the profile search field to only the people in that group (I mean so only the members of that group can get the result.)

I tried it and it worked!

One new issue came up though... mapping is not working as no geographic data is available. It seems the geocode cron service is not doing what it should?
I have google as my mapping and geo service and tried with both address parcing enabled and disabled. Ran the planned job manually to be sure but it is not resolving any addresses into coordinates :(
The joblog is always saying:

Code: [Select]
Summary
Finished execution of Geocode and Parse Addresses with result: Geslaagd (Beoordeelde adressen: 0 Adressen met Geocode: 0 )
Details


Parameters raw (from db settings):
geocoding=1
parse=1

Parameters parsed (and passed to API method):
a:3:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"1";}

Full message:
Finished execution of Geocode and Parse Addresses with result: Geslaagd (Beoordeelde adressen: 0
Adressen met Geocode: 0
)

After some reading here and in the docs I added the geocode=1 and parse=1 to the parameters but I doubt it makes a difference. Probably those are the default settings anyway.
I there any way I can get more detail on the parsing process so I can see why it is not working for the addresses stored in our DB?

Assuming the same mapping engine and contact with the google services are used for mapping event locations, if I do not put the coordinates in myself, those maps don't work either. But when I look up the coordinates for the event location and add them the map shows. So it must just be a matter of getting those 2 geocode fields filled. Do they have to be added into the profile before it works? After I added the extra location (as explained in my original post) I got an extra set of these 2 also when adding them to a profile. But I assumed they did not have to be added to a profile in order to use mapping. Wasn't in the documentation anyway.

Thanks again for your excellent help!

D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • map only select part of my contacts

This forum was archived on 2017-11-26.