8 Registrations Tab on Person Profile Shared by Jeff Richmond, The Well Community Church 5 months ago 12.0 General Beginner Description I came across this idea for adding a Registrations tab on person profiles and agreed it could be really helpful and actually shouldn't be too difficult to implement, so here's what I came up with… Security Caution This recipe does not take security into account. All registrations will be visible on the registrations tab, even if the registration template is restricted to only certain staff. How-To Create a new page under Internal Homepage > People > Person Pages and name it Registrations. Basic Settings Layout: PersonDetail Advanced Settings Page Routes: Person/{PersonId}/Registrations Person Parameter Name: PersonId Add a new Dynamic Data block to the SectionC1 zone. Block Properties Update Page: No Block Criteria Parameters: PersonId= Hide Columns: TemplateID,InstanceID,RegistrationID Selection URL: ~/page/405?RegistrationId={RegistrationID}&RegistrationInstanceId={InstanceID} Wrap in Panel: Yes Panel Title: Registrations Panel Icon CSS Class: fa fa-clipboard-list Query: SELECT TemplateID, InstanceID, RegistrationID, RT.Name AS Template, RI.Name AS Instance, CAST(R.CreatedDateTime AS Date) AS Date, RC.RegistrantCount AS Registrants, CAST(MAX(Registrar) AS bit) AS Registrar, CAST(MAX(Registrant) AS bit) AS Registrant FROM ( SELECT RT.ID AS TemplateID, RI.ID AS InstanceID, R.ID AS RegistrationID, 1 AS Registrar, 0 AS Registrant FROM PersonAlias PA INNER JOIN Registration R ON R.PersonAliasID = PA.ID INNER JOIN RegistrationInstance RI ON RI.ID = R.RegistrationInstanceID INNER JOIN RegistrationTemplate RT ON RT.ID = RI.RegistrationTemplateID WHERE PA.PersonID = @PersonID UNION ALL SELECT RT.ID AS TemplateID, RI.ID AS InstanceID, R.ID AS RegistrationID, 0 AS Registrar, 1 AS Registrant FROM PersonAlias PA INNER JOIN RegistrationRegistrant RR ON RR.PersonAliasID = PA.ID INNER JOIN Registration R ON R.ID = RR.RegistrationID INNER JOIN RegistrationInstance RI ON RI.ID = R.RegistrationInstanceID INNER JOIN RegistrationTemplate RT ON RT.ID = RI.RegistrationTemplateID WHERE PA.PersonID = @PersonID ) X INNER JOIN RegistrationTemplate RT ON RT.ID = X.TemplateID INNER JOIN RegistrationInstance RI ON RI.ID = X.InstanceID INNER JOIN Registration R ON R.ID = X.RegistrationID CROSS APPLY (SELECT COUNT(*) AS RegistrantCount FROM RegistrationRegistrant WHERE RegistrationID = R.ID) RC GROUP BY TemplateID, InstanceID, RegistrationID, RT.Name, RI.Name, R.CreatedDateTime, RC.RegistrantCount ORDER BY Date DESC, Registrant DESC, Registrar DESC That's it! Every person profile in Rock will now have a Registrations tab that shows all of the Event Registrations they're associated with. Clicking on any of the registrations will take you directly to the details for that registration. Follow Up Please don't hesitate to leave a comment below or hit me up on Rock Chat (@JeffRichmond) if you have questions or find any issues with this recipe. If you come up with better or more efficient ways of doing anything in this recipe, please let me know. Thanks! Change Log 2022-10-13 - Initial Version
Tina Reusch Reply 5 months ago (edited 5 months ago) We did something similar, but since our focus was being able to see not only what they registered for, but also if they have a balance due, we used lava to do it, so we could get to the "BalanceDue" value that is a calculated lava field.I tried to paste the code here, but every time I do, it puts in the weird html characters in, in place of greater than and less than symbols, etc. I have tried to use the code mark up characters and that doesn't work. I'd love to share the code, so you all can use it, if you like, but I am not sure how to provide it in a way that will allow it to be usable/readable.
Tina Reusch 5 months ago Ok, I am just going to link to a google doc so you can get the code there if you want it. I can't for the life of me figure out how to get it to paste in here for you to be able to use it. Sorry!https://docs.google.com/document/d/1ANm__uDybQJ9IWiVKzFOdgQuiqIG2lxbg3iYR-xdkwo/edit
Jeff Richmond Reply 5 months ago (edited 5 months ago) Thanks for sharing! I wish there was an easier way to include some of the default Rock grid functionality like pagination when using Lava templates.One of the reasons I didn't include balances was because I was trying to stick with the Dynamic Data block's default grid behavior, and I didn't want to try to figure out calculating accurate balances using SQL. Looking at your code, I may have to reconsider... especially since I literally wrote the recipe for Lava pagination 🤣https://community.rockrms.com/recipes/242/content-pagination-shortcode
Ben Murphy Reply 5 months ago Jeff, we see many churches add a person sub-page like this but for Event Payments. You may want to consider adding a Transactions List block below your Dynamic Data block and giving it the PersonId context like the typical Contributions sub-page has. Set that Transaction List block to only show a transaction type of Event Registration and you can even focus it down to just the Event funds. You could then secure it to only those with Finance roles if needed.
Jeff Richmond 5 months ago That's not a bad idea! I had started to include the registration costs and current balance in the dynamic data block, but decided against it since it wasn't restricted by permissions. I'll definitely look into the Transaction List block. Thanks!
Rachel Adams Reply 5 months ago This is amazing! Thank you for putting the time and effort into creating an easy-to-follow recipe!