Answers.Body: <p>If the smart group approach is working other than the update latency, you could reduce the Smart Group Cache Timeout at Administer > Customize Data and Screens > Search Preferences.  Beware that it is likely to increase load on the system, but that may be worthwhile in your case.</p>
  
  <p>See <a href="https://docs.civicrm.org/user/en/stable/organising-your-data/smart-groups/#smart-group-caching" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/stable/organising-your-data/smart-groups/#smart-group-caching</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-24T11:49:12.007Z
Answers.Text: Fantastic! Thank you
Answers.UserDisplayName: naomi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-24T11:33:08.047Z
Answers.LastActivityDate: 2016-11-24T11:33:08.047Z
Answers.UserDisplayName: Aidan
Body: <p>I would like to create a dashlet listing contacts who do not have a certain type of activity scheduled.</p>
  
  <p>I've tried a comnbination of smart groups and include/exclude search, which works but does not update in real time.</p>
  
  <p>Volunteers need to see the immediate result if they make an appoitment for a client, the client needs to disappear from the list. Otherwise they will be worried that they haven't done it correctly, and it won't inspire confidence in the system.</p>
  
  <p>I've looked at Views but if I create a view with Contact as the main entity, I try to add a relationship to Activities but Activities does not come up as an option.</p>
  
  <p>I'm about to write a hook that tags and untags contacts when the appointments are made, completed or cancelled. Do I really have to do this? It seems there must be another way!</p>
  
Tags: <activities><drupal-views><dashboard><reports>
Title: Real-time dashlet of contacts without certain activity
ThreadText: # Real-time dashlet of contacts without certain activity
  
  (Asked by: username_0 on 2016-11-24)
  
  I would like to create a dashlet listing contacts who do not have a certain type of activity scheduled.
  
  I've tried a comnbination of smart groups and include/exclude search, which works but does not update in real time.
  
  Volunteers need to see the immediate result if they make an appoitment for a client, the client needs to disappear from the list. Otherwise they will be worried that they haven't done it correctly, and it won't inspire confidence in the system.
  
  I've looked at Views but if I create a view with Contact as the main entity, I try to add a relationship to Activities but Activities does not come up as an option.
  
  I'm about to write a hook that tags and untags contacts when the appointments are made, completed or cancelled. Do I really have to do this? It seems there must be another way!
  
  **Tags:** activities, drupal-views, dashboard, reports
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-24. Score: 2 | Accepted answer
  
  If the smart group approach is working other than the update latency, you could reduce the Smart Group Cache Timeout at Administer > Customize Data and Screens > Search Preferences. Beware that it is likely to increase load on the system, but that may be worthwhile in your case.
  
  See <https://docs.civicrm.org/user/en/stable/organising-your-data/smart-groups/#smart-group-caching>
  
  > **Comments:**
  > **username_0**: Fantastic! Thank you  
  
  ---
  
  