1

I am using a Microsoft List for employees to request their leave (annual / sick leave).

I have a column called 'Leave Start Date' where they enter the start date of their leave. It currently has a Validation formula so that they can't apply for leave that's less than 10 days away:

=IF([Leave Start Date]<DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())+10),FALSE,TRUE)

We have this rule for Annual Leave only which is what causes my problem. For Personal Leave I need them to be able to select any date and even backdate.

I have a Choice Column where they select their leave type from the choices.

Is it possible to make the 'Leave Start Date' Column rule only apply if they select Annual Leave for vacation purposes?

Any ideas are appreciated.

1
  • I am checking the status of this case. Please let us know if you would like further assistance. If you have any update about this issue, please feel free to post back. Commented Jun 18, 2024 at 6:30

1 Answer 1

0

Yes it is possible using SharePoint list validation formula. You have to use the List validation settings instead of Column validation settings.

Use formula like this:

=IF([Leave Type]="Annual Leave",IF([Leave Start Date]<DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())+10),FALSE,TRUE),TRUE)

Use your actual Leave Type column name and annual leave value in above formula.

You can find the detailed steps to add list validation formula in my answer at: List validation if then syntax

Note:

  1. Sometimes comma(,) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.