SharePoint 2010 provides the feature to validate list columns by using formulas. The validation can either be done at the column level or at the list level.
Column Validation
Example: You have a list for entering Orders and one of the conditions is the applicant has to be of age 20 or above to order .
- Create a Column named Age
- Select Number as the type
- In the Column Validation field enter the following
=[Age]>=20
- In the User message field, enter a message that is displayed to the user when validation fails
- Click OK to complete
List Validation
Use List validation to validate a column value with another column value in the same list.
Example: When an order for an item is entered, validate that the quantity requested is less than the available quantity
- Create two Columns named Quantity Available and Order Quantity respectively
- Select Number as the type for both columns
- Click OK to complete the column creation.
Validation Settings
- Click List Settings and choose Validation settings
- In the Formula field, enter
=[Quantity Available]>[Order Quantity]
- In the User message field, enter a message that is displayed to the user when validation fails
- Click Save
What to be aware
- You cannot reference a column in a different list
- Column ID cannot be referenced in a formula
Test the validation
Related posts:






