Oh I didn't explain, it's strange to me because you could potentially have thousands of users. Seems strange to keep thousands of entries in an array field. Is it even possible?
Oh I didn't explain, it's strange to me because you could potentially have thousands of users. Seems strange to keep thousands of entries in an array field. Is it even possible?
Gabriel,
How many events do you plan to store, thousands?
Probably it's easier to store a list event for a user.
sorry I don't understand. If I store the events that a user is going to in the user collection, how will that allow me to get the result set I'm after?
Event 1, User 1
Event 2, null (or blank)
Event 3, null (or blank)
This has further implications. I also want to have a partner search functionality where I'll want to show a list of people who a looking for partners for specific events. It's starts to get a little unwieldy managing all permutations in arrays. And the fundamental question still hasn't been answered.
Am I able to get this result either by using different collections as I have, or by using arrays that might have thousands of users in the events collection. If I add the event to the user can I show all events, even those that the user is not going to?
These are all fairly fundamental types of applications, I'm perplexed that it's so difficult to answer. Is there an example of a dating site I could reference? That would have to use similar functionality to what I'm asking for.
I appreciate your help.
Cheers,
Gabriel.
Perhaps I can do this in code? Can I query collections in code to construct my results and map them in the panel programatically rather than using services to map?
Hello! You have to use 2 services - for collection colAttend to get all records with UserN and service to get all events from colEvents collection.
1) Do request to colAttend collection to get all records with UserN. On service success event save all events you have in response in array. After saving events array on service success event invoke another service to get all events.
2) In mapping of service you use to get all events add JS in mapping to "ticked" picture. In JS check is there event in array user is going to and show/don't show picture.
hey this sounds like a solution! Progress.. I'll give it a go tonight and let you know how i go.
Thank you for your patience.