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?

link|improve this question

feedback

1 Answer

up vote 2 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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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