none
limit to the amount of daily entries that can be added to a SharePoint calendar

    Question

  • Hello Everyone,

    Does anyone know how to set a limit to the amount of daily entries that can be added to a calendar?

    Let's say that I wanted to limit the amount to 5 per day. So once that limit is reached, a message would show saying that you have reached the maximum number of entries for that day.

    I am not an experience SP administrator. If anyone could provide detailed steps on how to proceed that would be a big help.

    Let me know if you need more information.

    Best

    CSJ

    Friday, November 9, 2018 1:36 PM

All replies

  • Hi CSJ, this could be done with some code on your forms for new and updated items. You can use a REST query to pull in all items from the calendar for the day they are submitting and then if that number is >= 5, don't let them submit. Best to do inside a PreSaveAction function in your javascript. 


    Please remember to mark as answer if you found this to be helpful. Andy Wessendorf | Belcan

    Friday, November 9, 2018 2:15 PM
  • Hi CSJ,

    Unfortunately, you can't control the total number of entries that should be added per day as OOTB.

    In my opinion, the flexible workaround is creating an Event Receiver on itemAdding to check the total number of the entries that created today before adding any new entry to prevent adding any new entries If the number of created entries is greater than the specified Entry Limit.

    To get starting, check the below links:

    How to: Create an Event Receiver

    How to: Create an Event Receiver for a Specific List Instance

    Steps To Create Item Event Receivers In SharePoint

    Note: If you are not familiar with code, your requirement is hard to achieved.

    In addition, this article has a same requirement as you, finally the author created an event receiver to solved his issue. You can have a look.

    Best regards,

    Allen Bai


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.


    Monday, November 12, 2018 7:51 AM