+1 vote
in Rock by TinaStephens (8.6k points)
edited

I have a team that wants to be able to see all registrations that are full so they can prevent announcing an event that can no longer take registrants. I don't see the appropriate data view filter to pull this information.

1 Answer

+1 vote
by TinaStephens (8.6k points)
edited
 
Best answer

You can use a Dynamic report to query for registration instances where a capacity has been set and has been reached. Using a Dynamic Report block add the query and settings below:

SELECT RI.Id
    ,RI.[Name] AS [RegistrationInstance]
    ,RI.[IsActive]
    ,Registrants.[Count] AS [Registrants]
    ,RI.MaxAttendees
    ,CAST(CASE WHEN Registrants.[Count] >= RI.MaxAttendees THEN 1 ELSE 0 END AS BIT) AS [Full]
FROM RegistrationInstance RI
OUTER APPLY (
    SELECT COUNT(*) AS [Count]
    FROM Registration R
    INNER JOIN RegistrationRegistrant RR On RR.RegistrationId = R.Id
    WHERE R.IsTemporary = 0 
        AND R.RegistrationInstanceId = RI.Id
) Registrants
WHERE RI.MaxAttendees > 0

enter image description here

You can see it on our demo site here too: https://demo.9embers.com/page/2269

Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...