Answers.Body: <p>Look at using the 'relationships' feature in drupal views (on right under Advanced) which should allow to add the Activity Contact, specify that you want to filter it to 'Source' and then add a Display Name field and use that Relationship</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-22T18:23:04.030Z
Answers.Text: Excellent - glad you could follow my shorthand explanation - if you think it could be improved by all means offer a clearer step by step instruction and I can update the Answer to make it more useful for others
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-21T19:09:11.020Z
Answers.LastActivityDate: 2018-03-21T19:09:11.020Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I have created a Drupal view which is used to show any emails sent through CiviCRM to the currently logged in contact. To list the emails, the view shows activities for that contact where the activity type = 'email'. I am able to show the title, subject, details and date and the view works fine. However, everytime I try to add in the Activity Source Contact field, suddenly the view has no results. I am assuming that the Activity Source Contact field is the 'Added By' field in CiviCRM for the activity (which is the 'From' field for the email)? If it is, I can't understand why suddenly the view has no results when I add the field.</p>
  
  <p>The other strange thing is, in the Activity Source contact field settings in the view, there is a numeral formatter, which is strange for a text field. See the attached image.</p>
  
  <p>Can anyone suggest how I can display the Activity "Added by" field in the Drupal view? </p>
  
  <p><a href="https://i.sstatic.net/aufmO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aufmO.png" alt="enter image description here"></a></p>
  
Tags: <activities><drupal-views>
Title: Show Activity Source Contact in a Drupal View
ThreadText: # Show Activity Source Contact in a Drupal View
  
  (Asked by: username_0 on 2018-03-21)
  
  I have created a Drupal view which is used to show any emails sent through CiviCRM to the currently logged in contact. To list the emails, the view shows activities for that contact where the activity type = 'email'. I am able to show the title, subject, details and date and the view works fine. However, everytime I try to add in the Activity Source Contact field, suddenly the view has no results. I am assuming that the Activity Source Contact field is the 'Added By' field in CiviCRM for the activity (which is the 'From' field for the email)? If it is, I can't understand why suddenly the view has no results when I add the field.
  
  The other strange thing is, in the Activity Source contact field settings in the view, there is a numeral formatter, which is strange for a text field. See the attached image.
  
  Can anyone suggest how I can display the Activity "Added by" field in the Drupal view?
  
  [![enter image description here](https://i.sstatic.net/aufmO.png)](https://i.sstatic.net/aufmO.png)
  
  **Tags:** activities, drupal-views
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-21. Score: 1 | Accepted answer
  
  Look at using the 'relationships' feature in drupal views (on right under Advanced) which should allow to add the Activity Contact, specify that you want to filter it to 'Source' and then add a Display Name field and use that Relationship
  
  > **Comments:**
  > **username_1**: Excellent - glad you could follow my shorthand explanation - if you think it could be improved by all means offer a clearer step by step instruction and I can update the Answer to make it more useful for others  
  
  ---
  
  