locked
Limit number of accepted attendees in calendar event RRS feed

  • Question

  • How can I setup an event and send an email?

    And how can I limit the number of accepted attendees, for example for event1, attendees should only be 10, so for the 11th person who accepted cant be accomodated or he cant accept it?

    whats a good approach on this?


    ----------------------- Sharepoint Newbie

    Tuesday, June 4, 2013 9:03 AM

Answers

  • It all depends on how you want to configure / develop the system. In the scenario I'm giving;

    1. The organiser creates an event (an new list item). That list item contains a field that records the maximum number of attendees, the current number of available spaces, and a field for recording the attendees (a user multi field).

    2. The organiser then advertises the event. I.e. All current events might be advertised by a webpart on a webpage somewhere

    3. Attendees book the event by using a custom form (I.e. webpart or an application page). This webpart checks the list item (for the event) to see if there are any available spaces remaining; if so, it de-increments the number of available spaces, appends the attendees field (the user multi field) with the current user, and uses EWS to put the calendar entry into the users Outlook calendar.

    In the above scenario, no "Outlook invitation" is sent, and the onus is on the user to book himself/herself into an event. When this happens, the event is added to their Outlook calendar automatically.


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    • Marked as answer by Jack-Gao Tuesday, June 11, 2013 9:42 AM
    Tuesday, June 11, 2013 7:17 AM

All replies

  • I created a project once for a similar requirement. It consisted of a custom list, that contained all the fields for the event (starttime, endtime, availablespaces, capacity, location,registeredpeople ...and so on). The solution employed custom forms that allowed people to register/un-register from events.

    The basic way it worked:

    1. Events get added to the list (time of the event, maximum people, etc)
    2. People book onto an event by selecting the event from the list (surfaced via a webpart), and then completing the registration form.
    3. When the registration form is submitted, it checks if there are still remaining spaces (by comparing the capacity field with the availablespaces field), and if there are still spaces, then it increments the availablespaces field value, and adds the user to the registeredpeople field (usermulti field), and updates the list item.

    It also uses EWS to put an appointment in the users Outlook calendar (I blogged about that bit here: http://matthewyarlett.blogspot.co.uk/2012/07/using-ews-exchange-web-services-in.html)

    As an alternative to this approach, you could use an OOTB event list, add some extra fields for specifying the capacity, available spaces, etc, and attach an event receiver to the list that does the same sort of checking. However, the reason I used custom forms, is that the users didn't have access to edit the list; my forms did extra validation, then elevated permissions to update the list item.


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos


    • Edited by Matthew Yarlett Tuesday, June 4, 2013 9:30 AM Added an alternative approach.
    Tuesday, June 4, 2013 9:26 AM
  • thank you for this very helpful input, Matthew.

    Basically, here's what I understand from your helpful reply.

    so what I will do is to create an event handler that will be attached to the calendar, this event handler will copy the details to the custom list.

    QUESTIONS:

    1. So the registration form is an infopath? or OOB way of creating listitems?

    2. Where will I set the limit for the event?

    3. This may sound weird, but what is the difference between calendar and events list? Its my first time to hear the events list


    ----------------------- Sharepoint Newbie

    Wednesday, June 5, 2013 12:30 AM
  • Using the first approach, all the data is in one list. Each event is represented by one list item, and as people register/un-register to/from the event, a counter is incremented/de-incremented to track the number of attendees and to control how many people register. Another field (a user multi field) on the same list item tracks the registered attendees. 

    The form would be a custom application page that would typically display the events details, with a button for "registering". The buttons onclick event would be where the code checks if there are available spaces at the event, and if so, updates the events list item with the users details, and de-increments the available spaces.

    In the first option, an event handler is not needed.

    There is no difference between a calendar list and an events list (I just call calendar lists event lists, because the content type a calendar list uses is "event"). Sorry for the confusion!


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    Wednesday, June 5, 2013 10:39 AM
  • Thank you again for these info.

    Here's the flow of my understanding, please let me know if this is how it works.

    1. Event Organizer(user) will create a calendar event/item - where will I place who will be notified (just like in outlook where you can invite attendees and they will just accept/decline) where will I put the limit of attendees?

    2. This will trigger the event receiver that is activated in the calendar

    3. Code behind/event receiver in the calendar will add an item to the custom list that will check the limit (see question in #1)

    thanks


    ----------------------- Sharepoint Newbie

    Saturday, June 8, 2013 3:52 AM
  • It all depends on how you want to configure / develop the system. In the scenario I'm giving;

    1. The organiser creates an event (an new list item). That list item contains a field that records the maximum number of attendees, the current number of available spaces, and a field for recording the attendees (a user multi field).

    2. The organiser then advertises the event. I.e. All current events might be advertised by a webpart on a webpage somewhere

    3. Attendees book the event by using a custom form (I.e. webpart or an application page). This webpart checks the list item (for the event) to see if there are any available spaces remaining; if so, it de-increments the number of available spaces, appends the attendees field (the user multi field) with the current user, and uses EWS to put the calendar entry into the users Outlook calendar.

    In the above scenario, no "Outlook invitation" is sent, and the onus is on the user to book himself/herself into an event. When this happens, the event is added to their Outlook calendar automatically.


    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    I just added a webpart to the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here: Upload and Crop User Profile Photos

    • Marked as answer by Jack-Gao Tuesday, June 11, 2013 9:42 AM
    Tuesday, June 11, 2013 7:17 AM