Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have 2 date fields. I want the END_DATE field to be greater than START_DATE.

For this I use the following validation

=AOS_validfrom<=AOS_validto

All this works fine.

Now I want to extend the validation to be conditional. If the END_DATE has a value, then I want it to validate like above.

If the END_DATE is empty - then pretty much ignore the validation rule.

Is this possible?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I don't know what your markup is but here's a formula for list validation in SharePoint 2010 that should do what you need. Just add this to the list for your validation (and adjust the field names accordingly).

=IF(NOT(ISBLANK([End Date])),[End Date]>[Start Date],TRUE)

This will only validate the end date to be greater than the start date when you have a value in the end date field.

Hope that helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.