Posted: July 20, 2017 at 7:24 pm
|
Did not find anything in Forum. |
|
More details: Primary Registrant will answer question e.g. Meeting Location selected from dropdown list. Need to know that any other Attendees in the Checkout are also associated with the selected question location (ANS_value) to get a location count and attendee list by Ticket Name. SQL Query using EVT_ID and QST_ID only associates with Primary Ticket (but can get counts per REG_group_count for REG_count = 1. It looks like TXN_ID is the only common link? |
Yes and you can use the built in model system which will handle the queries for you. There’s some more information about how to use the model system in the developer documentation: |
|
|
It looks to me that the EE4 Model currently does not support what I need since Questions are only linked to the Primary Registrant. In the future, including an index for TXN_ID in wp_esp_answer will allow associating questions with all Registrants in the Checkout (i.e. Checkout Questions). Please add this request to your Roadmap. |
The EE4 Model does support this because the |
|
|
I understand EE4 has REG_ID and TXN_ID in wp_esp_registration, and REG_ID in wp_esp_answer. So I am able to get Questions for the Primary Attendee (of course). I also understand that I can identify all Registrations associated with the TXN_ID. I don’t see how I can easily relate the non-Primary Attendees to Questions without TXN_ID in wp_esp_answers. |
Same suggestion: You can use the model system for this and it will handle much of the querying for you without any adding tables. Here’s a gist that has some example code that outputs a list of all attendees for a specific event on the event page and each attendee in the list includes the answer from the primary registrant of their group: https://gist.github.com/joshfeck/5a16714f39f1392ca741a81c578a7102 |
|
|
THX Josh… very helpful for using in EE… which I will do. My immediate need is to extract the EE data via SQL to use with an external reporting engine. So I will need to study the EE model to figure out what EE is doing. Looks like maybe a FORCE INDEX? So far my SQL is good for the order (Primary Attendee) but I’m not able to get Answer for all Attendees. Any snippets of SQL are welcome. Here’s what I have so far: SELECT |
You can inspect the generated queries by adding the show_next_x_db_queries() function your PHP debugging code: You might also consider using the EE4 REST API to get data to your external reporting engine: |
|
|
All good ideas. Thank you for the feedback. For now, my TEMP solution was to: Step-1 Add ANS_value fields to Registrations and Transaction. Step-2 add Answer to Registration for Primary Attendee. Step-3 Add Registration Answer for Primary Attendee to Transaction. Step-4 create mysql events to recurring process Step-2 and Step-3. Step-5 The Transaction is used to link all Registrations in the Checkout to the Primary Attendee Answer. |
The support post ‘EE4 How to Associate Custom Question with All Registrants in Same Transaction’ 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.