blog.frederique.harmsze.nl my world of work and user experiences

May 31, 2010

Smart validation right out-of-the-2010-box

Filed under: Interaction,SharePoint — Tags: , — frederique @ 23:47

In SharePoint list and libraries, we can always specify if a particular field is required or not. For example, documents in a library have to be categorized, issues have to be assigned to somebody and tasks need a status, which can be ‘Not started’ of course.

In real life we often need smarter validation than just making a field required. To avoid messing up your process, a start date should be before the end date. To avoid losing money, the discount you give should be smaller than the actual cost of the item. And to avoid bothering your users, they should not have to fill in fields that are not important for this item. For example, high priority tasks really need a Due Date, which you can just skip for lower priority tasks.

Validation: the Due Date is required because the Priority is High

Validation: the Due Date is required because the Priority is High

In 2010, you can actually specify the validation settings for your list, in a formular with the available columns. This only works for “calculable colums”, not for multiple lines of text or lookups. If the formula is true, then you can save the item. And if it is false, then you need to fix the problem. You can specify the error message as well.

Link to the validation settings

Link to the validation settings

So, with the formula =IF(Priority=”1. High”,IF([Due Date]<>””,TRUE,FALSE),TRUE) we can ensure that high priority tasks always get a Due Date.

Validation settings

Validation settings

Now of course none of this ensures that the users actually enter sensible Due Dates or that they adhere to them. But we have at least made it a bit easier to enter the right data.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress