List validation accepts excel functions

List validation in SharePoint 2010 is another great step toward the development of “Zero Code” enterprise applications. ‘Excel style’ validation formulas can be defined to determine the validity of new list items, once a user try to add new list item, the formula is executed against the item columns. It should be noted, that excel functions are also valid for the validation formulas, this gives the user much more power in defining the validation rules. For example, in a calendar, to prevent employee from catching a meeting room for days, one can define a validation rule: The maximum meeting length is less than 2 days using the excel function “DateDif”:

Then, whenever a user is trying to add or edit an item via the web part form (the default list form) or using InfoPath form, should the data not meet the define criteria – an error message is presented:

© 2024 Yoni Goldberg. All rights reserved.