1

I'm having troubles setting up a View that displays a list of registrants (not registrations!) for a particular event. I don't know how to setup RELATIONSHIPS correctly?

(I have already created a view that displays all registrations for a particular event, but since the user can register more than once for a particular event, I'm getting a list with multiple users enteries (if user registered multiple times) which is not what I want.)

Any suggestions?

0

For displaying user entries only one, open the Query settings: Settings located at bottom of the Advance section. There u can check the Distinct checkbox which will make the view display only distinct items.

Hope this help you...

1
  • Distinct cannot solve this since registration ID is always unique per event, but user ID is not and I would need to apply distinct on that column.
    – Antonio
    Nov 13 '13 at 16:09
0

I do not see a difference between registrations and registrants,this can be handled with what fields you are showing in the views.While the problem of having repetitive results can be handled by showing the distinct results but I would have preferred doing it at the time user is registering multiple times for the same event user has already registered, as the problem you are having user will face the same problem, they will never know if they are already registered for the event, instead a validation should be there on email address(or any unique field to catch user presence) and event to tell user about being already registered.

1
  • There is a difference between registrations and registrants: User can have more than one registration per event (in my case that is desirable). That means if I list all registrations for particular event, I could possibly get multiple enteries of one user. Distinct cannot solve this since registration ID is always unique.
    – Antonio
    Nov 13 '13 at 15:59
0

I believe you can expose user fields and add a relationship on the user entity referenced by registration field "user". This may not solve your duplicate problems.

You may be able to list users instead, and add a relationship to the registration referencing the user, and you may need to go one level deeper and add a relationship to your event content referencing the registration. Then filter on the registration existing and on the event content ID.

If anonymous users can register, both of these will have slight issues with that.

0

Dealing with duplicates like this is often an issue with Views. I have two suggestions to try:

  1. Assuming this is a field-based View, try using "group by" on a user field, and don't display any of the registration distinct information, if possible. You may want/need to play with display tricks, whether specifying tags or custom CSS to get the display nice.
  2. If that doesn't do the trick, you may have to resort to a hook_views_prerender function, and combine/eliminate results there. It's not fun, but I have had to do that kind of thing on more than one occasion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.