Answers.Body: <p>You can total up the participants by looking up the line items.</p>
  
  <p><a href="https://gist.github.com/ginkgomzd/5ca327a0711fdb586529a4936accb244" rel="nofollow noreferrer">https://gist.github.com/ginkgomzd/5ca327a0711fdb586529a4936accb244</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-16T02:32:33.757Z
Answers.LastActivityDate: 2016-12-16T02:32:33.757Z
Answers.UserDisplayName: ginkgoMZD
Answers.Body: <p>Probably you should check each individual Participant record for the actual number of participants and count them manually. With manually I mean you can count them with smarty code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-16T08:18:54.527Z
Answers.LastActivityDate: 2015-11-16T08:18:54.527Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.Body: <p>I would also check out and install the excellent Summary Fields extension from Jamie McClelland (see <a href="https://civicrm.org/extensions/summary-fields" rel="nofollow">https://civicrm.org/extensions/summary-fields</a> ) which among many other summaries shows counts for Events attended per contact and also see Events -> Dashboard -> Event Summary (which might be in core, or might be enabled after installing the Summary Fields extension - not sure which ).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-16T16:59:10.477Z
Answers.LastActivityDate: 2016-09-16T16:59:10.477Z
Answers.UserDisplayName: Joe McLaughlin
Body: <p>I have an event with a price set which allows multiple registrations on one email.  It accurately counts the number of people registered against the maximum allowed.  How do I get the number of "actual participants" from the API?  This snippet only counts the number of registration records:</p>
  
  <p>{crmAPI var="ParticipantS" entity="Participant" method="getCount" sequential="1" event_id=$event.id } 
  Count = {$ParticipantS.count}</p>
  
Tags: <civievent><api>
Title: How to get the number of event "actual participants" from the API?
ThreadText: # How to get the number of event "actual participants" from the API?
  
  (Asked by: username_0 on 2015-11-16)
  
  I have an event with a price set which allows multiple registrations on one email. It accurately counts the number of people registered against the maximum allowed. How do I get the number of "actual participants" from the API? This snippet only counts the number of registration records:
  
  {crmAPI var="ParticipantS" entity="Participant" method="getCount" sequential="1" event\_id=$event.id }
  Count = {$ParticipantS.count}
  
  **Tags:** civievent, api
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-12-16. Score: 2
  
  You can total up the participants by looking up the line items.
  
  <https://gist.github.com/ginkgomzd/5ca327a0711fdb586529a4936accb244>
  
  
  ---
  
  ### Answer by username_2 on 2015-11-16. Score: 1
  
  Probably you should check each individual Participant record for the actual number of participants and count them manually. With manually I mean you can count them with smarty code.
  
  
  ---
  
  ### Answer by username_3 on 2016-09-16. Score: 0
  
  I would also check out and install the excellent Summary Fields extension from Jamie McClelland (see <https://civicrm.org/extensions/summary-fields> ) which among many other summaries shows counts for Events attended per contact and also see Events -> Dashboard -> Event Summary (which might be in core, or might be enabled after installing the Summary Fields extension - not sure which ).
  
  
  ---
  
  