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: how to have Address fields available in a 'User' type View
Pages: [1]

Author Topic: Views: how to have Address fields available in a 'User' type View  (Read 1810 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
Views: how to have Address fields available in a 'User' type View
June 16, 2009, 08:29:33 pm
Hi - have a Views2 that is showing members of an OG - so is a View that is "displaying items of type User."

I was aiming to show the 'Region' (ie Province/State) field from civicrm, but found that the only Group of Fields available in the view was CiviCRM Contacts - which is only listing names, gender, job title etc.

Anyone able to supply some of the recipe for getting more civicrm fields showing here. Thanks
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

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views: how to have Address fields available in a 'User' type View
August 04, 2009, 02:17:39 pm
I would like the same thing.  I suspect it is because the only "join" created to the drupal users table is from the Contacts table, the data from which does appear in a user-type view.  The join is at line 92ff  I tried to create a join between civicrm_address and users, but it doesn't seem to be 'taking'.

I pasted the following at line 523, but it didn't work:

Code: [Select]
    // For other base tables, explain how we join - 
    $data['civicrm_address']['table']['join']['users'] = array(
           'left_table'   => 'civicrm_uf_match',
           'left_field'   => 'contact_id',
           'field'        => 'id',
    );
    $data['civicrm_uf_match']['table']['join']['users'] = array(
           'left_field'   => 'uid',
           'field'        => 'uf_id',
    );   


I am not a coder, so its failure is no surprise.  Any thoughts are welcome. 

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views: how to have Address fields available in a 'User' type View
August 04, 2009, 09:15:24 pm
Found this issue: http://issues.civicrm.org/jira/browse/CRM-4840

Applied patch, no change. 

What am I missing?

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Views: how to have Address fields available in a 'User' type View
August 05, 2009, 05:26:40 am
try emptying the views cache under /admin/build/views/tools after you apply the patch.

It definitely works for me
http://www.rootyhollow.com

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views: how to have Address fields available in a 'User' type View
August 05, 2009, 07:21:09 am
I have emptied it so often it is silly.  Still not working.  Would you mind attaching your version of civicrm.views.inc?  I am wondering if I am missing more than just that patch.

Exactly where SHOULD these new fields appear within views?  I assumed that they are available in the user-table based view, just like the Civicrm Contact group is available.  Is this wrong?  Are they elsewhere?
« Last Edit: August 05, 2009, 07:41:38 am by mariagwyn »

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views: how to have Address fields available in a 'User' type View
August 05, 2009, 04:50:35 pm
works with upgrade to 2.2.8.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views: how to have Address fields available in a 'User' type View

This forum was archived on 2017-11-26.