I’m talking about the SharePoint 2010 calendar list validations in this post.
Well, what i mean by ‘Past booking’ is user should not be able to add an event in the past date/time and Limit Advance booking means user should not be able to add an event beyond a limited number of days (eg: 2 days)
Calendar > List Settings > Validation settings > Formula
The below formula will prevent the user from booking for the past date/time.
=[Start Time]>Created
If you don’t want the user to created an event beyond 2 days limit:
=[End Time]<(Created+2)
Now, what if i want to combine both the above validations!! Here it is:
=AND([Start Time]>Created,[End Time]<(Created+2))
With this above formula in place, user won’t be able to create an event in the past date/time neither will he be able to create an event beyond 2 days from the current date/time.
Few more reference links for list/column validation:
http://jacksonc.wordpress.com/2009/12/07/list-validations-in-sharepoint-2010/
http://www.mstechblogs.com/sharepoint/list-level-validation-in-sharepoint-2010/
http://blog.knowledgelake.com/2010/04/ecm-features-that-rock-in-sharepoint-2010-list-validations/
http://mstecharchitect.blogspot.com/2010/01/field-and-list-item-validation-in.html
http://www.chakkaradeep.com/post/SharePoint-2010-List-Improvements-e28093-Column-Validation-and-List-Validation-Settings.aspx