Tuesday, June 22, 2010

List level Validation in SharePoint 2010 !

In one of my previous posts we looked at the different ways you could validate column content, but what happens if you want to compare one column value with another for validation before the item is saved? Well with SharePoint 2010 you can do this using the list validation features. In this post we are going to walk through a simple example, where we want to make sure that users enter a due date for the tasks that is greater than the start date. This can be configured using a very simple formula, show in the example below.

First, start with a Task List:



From the Ribbon, select the List Settings option:


Under the General Settings you should see an option for Validation Settings:


On this screen you can enter the formula that must equate to true and the message to present to the user if it does not evaluate to true (for our example, our formula is [Due Date] > [Start Date]:


Once you save these settings, the user will get the following message if they enter a due date that is prior to the start date:



This is just one example of the features inside SharePoint 2010 that can help ensure only meaningful data is added to the site.

No comments:

Post a Comment