Microsoft Office Tutorials and References
In Depth Information
As you can see in Figure 7.44, my Quantity was just over 10, which is not allowed
according to the column validation set earlier. And therefore, my save failed. My error message
for the Quantity field validation is now displayed, and the cursor is in the Quantity field,
ready for the mistake to be fixed.
9. Change the value in the Quantity field to 10 or less, and click Save again.
That should work. Your item should save, and you should end up on the Sales list content
page. Notice, in Figure 7.45, that my new item is listed, complete with the additional fields
and their content.
with new sales
As you can see, field (or column) validation is working. But there was an unfortunate data entry
error concerning the price being lower than the inventory cost of the item. That isn’t a good thing.
Wouldn’t it be nice if you could have some sort of validation that could compare two fields and, if
one were higher than the other, alert the user and not allow those values to be saved? Column
validation can’t see other fields in the list, so it can’t be used. But there is list validation.
List validation is just like column validation, but it can do calculations that refer to any of the
fields in the list.
Configuring List validation
To configure list validation on this list, go to the List Settings page.
1. On the List Settings page, click the Validation Settings link under General Settings.
On the Validation Settings page, there are two sections: Formula and User Message. The
Formul a section has a field selection box, allowing you to calculate based on other field
values (letting you select the field names rather than type them in).