Forum Discussion

RGreene's avatar
RGreene
Copper Contributor
Feb 11, 2019

SharePoint Calender Validation Settings - Restrict booking days and hours

Hello All

 

Need your assistance I have the following business requirement:

  1. User should not be able to book more than 3 hours a day to calendar
  2. User should not be able to book more than 21 days for reoccurring event.

I have used the following code:

=IF([End Time]-[Start Date]<21,TRUE,IF(AND([End Time]<=([Start Date]+TIME(3,0,0)),[End Time]>[Start Date]),FALSE,TRUE))

 

When this code is ran, reoccurring event is restricted to 21 days, however user is allowed to book more than 3 hours.

 

Any assistance would be great.

Resources