Answers.Body: <p>If your View is based on 'users' then your result makes sense. </p>
  
  <p>If your View is based on 'civi contact' then your result doesn't make sense unless you are using contextual filter, relationship or filter to specify 'user'.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-17T07:03:26.790Z
Answers.Text: If I base it on 'Civi contact' I do not get the custom fields
Answers.UserDisplayName: Flying
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-17T21:55:05.327Z
Answers.Text: Are the custom fields used for contacts?  If they are then they should be available.  We do stuff like this with Views pretty regularly.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-17T22:40:35.623Z
Answers.Text: In some cases you also need to clear Drupal caches to get new civi custom fields to show in Views
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-16T20:14:22.587Z
Answers.LastActivityDate: 2015-10-16T20:14:22.587Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I have problems with showing aggregated custom data.</p>
  
  <p><strong>Some frequently asked questions:</strong></p>
  
  <ul>
  <li><p>Yes, I have succesfully set up Drupal Views connected to the CiviCRM database, with the php.settings.file</p></li>
  <li><p>Yes, I have checked the Access custom data permissions.</p></li>
  <li><p>Yes, I have also set up the View with User field, and not the CiviCRM Contact field.</p></li>
  </ul>
  
  <p><strong>I am trying to achieve this:</strong></p>
  
  <p>The count of new contacts recruited this year (date of recruitment is a custom field).</p>
  
  <p><strong>What I get:</strong></p>
  
  <p>I only get the count of new contact recruited this year that is ALSO a Drupal user. But I cannot find any criteria or field that should refine the result like that.</p>
  
  <p>Do anyone have a tip for what to check for?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-17T02:37:02.827Z
Comments.Text: Can you inspect the sql query generated by views to get a clue?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-17T07:02:03.010Z
Comments.Text: Where do I find that?
Comments.UserDisplayName: Flying
Tags: <custom-fields><drupal-views>
Title: Custom field aggregation with Drupal Views
ThreadText: # Custom field aggregation with Drupal Views
  
  (Asked by: username_0 on 2015-10-16)
  
  I have problems with showing aggregated custom data.
  
  **Some frequently asked questions:**
  
  * Yes, I have succesfully set up Drupal Views connected to the CiviCRM database, with the php.settings.file
  * Yes, I have checked the Access custom data permissions.
  * Yes, I have also set up the View with User field, and not the CiviCRM Contact field.
  
  **I am trying to achieve this:**
  
  The count of new contacts recruited this year (date of recruitment is a custom field).
  
  **What I get:**
  
  I only get the count of new contact recruited this year that is ALSO a Drupal user. But I cannot find any criteria or field that should refine the result like that.
  
  Do anyone have a tip for what to check for?
  
  **Tags:** custom-fields, drupal-views
  
  > **Comments:**
  > **username_1**: Can you inspect the sql query generated by views to get a clue?  
  > **username_0**: Where do I find that?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-10-16. Score: 2 | Accepted answer
  
  If your View is based on 'users' then your result makes sense.
  
  If your View is based on 'civi contact' then your result doesn't make sense unless you are using contextual filter, relationship or filter to specify 'user'.
  
  > **Comments:**
  > **username_0**: If I base it on 'Civi contact' I do not get the custom fields  
  > **username_3**: Are the custom fields used for contacts?  If they are then they should be available.  We do stuff like this with Views pretty regularly.  
  > **username_2**: In some cases you also need to clear Drupal caches to get new civi custom fields to show in Views  
  
  ---
  
  