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 Drupal Modules (Moderator: Donald Lobo) »
  • Views - filter contacts by events they are registered to?
Pages: [1]

Author Topic: Views - filter contacts by events they are registered to?  (Read 809 times)

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Views - filter contacts by events they are registered to?
December 09, 2014, 06:59:10 pm
I'm working on creating a report, which I think is best done in views but I'm happy to be told otherwise. It should display all the children who are registered to attend an event and their parent's info. I've gotten as far as integrating Views with CiviCRM, but I'm not finding the filter options I need to display only contacts registered for an event, nor am I quite understanding how to work the relationships so that parents are shown. If documentation answering these questions exists, would you please point me to it? If not, does anyone have ideas about how I can create this report?

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: Views - filter contacts by events they are registered to?
December 09, 2014, 08:28:32 pm
hi naomi - you will need something like the attached - screenshot included too.

note the View starts with CiviCRM Participants in this example, then you add on the 'relationships' and filter to the Event.

hope it helps - if it does i will add to our 'treasure chest'
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

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 10:28:18 am
This is great, thank you so much!

It looks like children with 2 parents will display twice on the list, once for each parent, but that isn't a huge deal, as we can sort by name.

I haven't yet managed to make a second relationship work, such that contact C is the child's emergency contact, but it seems like it should be possible.

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 10:31:58 am
As a side note - do you keep said "treasure chest" somewhere such that I could go spelunking? It sounds like a great resource, if so.

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: Views - filter contacts by events they are registered to?
December 10, 2014, 10:59:31 am
You can use 'group by' or better still 'accordions' so you only have one reference to the child but multiple parents.

Said 'treasure trove' is here - not a great array of treasures but goal is to keep adding the example views. may be more like a dress up box ;-)

http://fuzion.co.nz/treasure-trove
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

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 11:59:48 am
I may have been over confident in my ability to add another relationship to this view...

I think that the issue isn't actually my ability to handle relationships, but rather the custom fields & relationships in the system which may not need some tweaking. So far I've found that "emergency contact" is not a relationship which views can handle, even though it is listed, and does not have any obvious differences from the parent-child relationship when viewed in customize data>relationship types. I've also found that some custom fields, which are set to be used for contacts, will not show up and will in fact delete the results I've already got. Perhaps this is becasue I am searching for participants instead of contacts? But I'm using "civicrm contacts: display name" to get the participant's names, and that hasn't been an issue. Any suggestions to help me out on either of these issues?

Thanks for linking me to the treasure!


 

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 12:09:25 pm
Got the custom data working! Even though you can find "civicrm contacts: customdatahere" in the dropdown, you actually have to use "civicrm custom: customdatahere" for the field. It always happens that as soon as I decide it's hopeless and post, I find answers.

Still stumped on the emergency contacts though.

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: Views - filter contacts by events they are registered to?
December 10, 2014, 12:17:14 pm
have you tried clearing drupal caches? sometimes i find it takes a 'kick' to make drupal views be aware of 'new' things in civi
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

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 12:45:25 pm
Hm...that doesn't' seem to be the issue, too bad. I like easy answers.

To troubleshoot, I just took away the parent relationship from the view and added only the emergency contact relationship, and it still doesn't display the emergency contact. It seems to be a probablem with the relationship itself. I wonder if I need to do something in the views integration to fix it? Would that make any sense? What kind of thing would it be that I did if that's the case?

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: Views - filter contacts by events they are registered to?
December 10, 2014, 01:07:52 pm
i haven't had a case where Views didn't just automatically know about 'new relationships' but ....

is this a relationship between ... what. Contacts? Orgs and Inds, inds and orgs, sub contact types?
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

naomisl

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: Drupal 7.32
Re: Views - filter contacts by events they are registered to?
December 10, 2014, 02:39:57 pm
Just a plain relationship between individual contacts. An adult has the relationship of "emergency contact of" a child. No permissions or anything fancy.

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: Views - filter contacts by events they are registered to?
December 10, 2014, 08:13:33 pm
this rings a feint bell from when i renamed a relationship and something choked - maybe try resaving relationship types? (guessing)
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 »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views - filter contacts by events they are registered to?

This forum was archived on 2017-11-26.