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) »
  • Create a View showing both sides of a CiviCRM Relationship
Pages: [1]

Author Topic: Create a View showing both sides of a CiviCRM Relationship  (Read 561 times)

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Create a View showing both sides of a CiviCRM Relationship
October 09, 2013, 07:10:24 am
Hi

Anyone know how to create a View that exposes contacts on both sides of a civicrm relationship? I have

Relationship Contact A = Accommodation Providers
Relationship Contact B = Guests

I want to expose these in Drupal Views to show all the guests who are related to an accomm provider.

Thanks!
www.ulearnschool.com

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: Create a View showing both sides of a CiviCRM Relationship
October 09, 2013, 12:35:03 pm
Sorry I can't give you more details but we have done some improvements to the way Views deals with Relationships so you can choose which end you are working from. This will come out with 4.4 I believe.

But currently you should be able to do what you want YOu need to open the Advanced section in View, and add a Relationship for the Relationship concerned and then use that to specify that a second column of eg Display Name uses the Relationship you just created.

not sure if that is clear enough but may get you started
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

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Re: Create a View showing both sides of a CiviCRM Relationship
October 10, 2013, 06:23:05 am
Hi Peter

Thanks a million - I followed that and got it to work eventually. Just spent time on simplifying the number of fields in the view. I found it helpful to use just two fields and change their Relationship type within the view until I got the results I wanted.

Cheers!
www.ulearnschool.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Create a View showing both sides of a CiviCRM Relationship

This forum was archived on 2017-11-26.