Support

Home Forums Wait List Manager Add-on Get waitlist "attendees" per event

Get waitlist "attendees" per event

Posted: March 25, 2019 at 3:43 am


ARAGATO

March 25, 2019 at 3:43 am

How do I get all people/attendees that are on the wait list for a particular event.


Tony

  • Support Staff

March 25, 2019 at 9:01 am

Hi ARAGATO,

Go to Event Espresso -> Events -> {hover over event} -> Registrations.

Select ‘Wait list’ in the status filter at the top of the registration list and click filter. Now you’ll see a list of all registrations on the waitlist.


ARAGATO

March 25, 2019 at 10:16 am

I meant via code. 😉


Tony

  • Support Staff

March 26, 2019 at 10:43 am

In that case, it’s a good idea to mention that in the op as it changes everything 🙂

You can use our models to pull the registrations, like this:

$where_params = array( 
	'EVT_ID' => 9999, 
	'STS_ID' => EEM_Registration::status_id_wait_list
);

$waitlist_registrations = EEM_Registration::instance()->get_all(array($where_params));
echo count($waitlist_registrations);

Obviously you’ll need to change the EVT_ID value to be the correct ID for your event but that will give you an array of EE_Registrations that have a status of Wait list.

I highly recommend you read through our documentation on the model system here:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

Most of the above has already been documented there.


ARAGATO

March 27, 2019 at 12:33 am

Hi Tony, the EEM_Registration::status_id_wait_list is what I was actually looking for. Thanks.

So, in order to actually get all attendees that are NOT on the waitlist I have to query like this:

            //Get attendee data
            $attendees = EEM_Attendee::instance()->get_all(
                array(
                    'order_by' => 'ATT_full_name', 'order' => 'ASC',
                    array(
                        'Registration.EVT_ID' => 123,
                        'NOT' => array('Registration.STS_ID' => EEM_Registration::status_id_wait_list)
                    ),
                )
            );

BTW: The link to your “Model Query Params Documentation” in your github pages is broken. The links end with “%5D” https://github.com/eventespresso/event-espresso-core/blob/master/docs/G--Model-System/model-query-params.md%5D
Therefor leading to a 404. Links should end with “.md”.


Tony

  • Support Staff

March 28, 2019 at 7:47 am

Hi Tony, the EEM_Registration::status_id_wait_list is what I was actually looking for. Thanks.

If your using the models, you find the registrations statuses that are avialable directly within the EEM_Registration.model.php file.

\event-espresso-core-reg\core\db_models\EEM_Registration.model.php

BTW: The link to your “Model Query Params Documentation” in your github pages is broken. The links end with “%5D” https://github.com/eventespresso/event-espresso-core/blob/master/docs/G–Model-System/model-query-params.md%5D
Therefor leading to a 404.

Thanks for letting us know, those links should be fixed now.

Links should end with “.md”.

Yes, just a typo in the markdown code leading to a trailing ] on the links.

The support post ‘Get waitlist "attendees" per event’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso