Forum Discussion
Annette1101
Nov 03, 2023Brass Contributor
SharePoint list column validation - if status is a certain value, require a date in another column
I have an Asset SharePoint list that has a status column. The column values are Active, Sold, Disposed. If the status is Sold or Disposed, I want the date column "Out of Service" to be required. I...
- Nov 07, 2023
Annette1101 Use list validation formula like this:
=IF(OR([Status]="Sold",[Status]="Disposed"),NOT(ISBLANK([OutOfService])),TRUE)
You have to use above formula in list validation settings and not in column validation settings.
Similar threads:
- How to have validation for SharePoint list column?
- SharePoint List validation formula if then syntax
Note:
- 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( , ).
- Use correct display name (not internal name) of your SharePoint columns in above formula.
- Wrap column names inside [] if your column name has space in it. For example: [My Column Name].
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap
Nov 07, 2023MVP
Annette1101 Use list validation formula like this:
=IF(OR([Status]="Sold",[Status]="Disposed"),NOT(ISBLANK([OutOfService])),TRUE)
You have to use above formula in list validation settings and not in column validation settings.
Similar threads:
- How to have validation for SharePoint list column?
- SharePoint List validation formula if then syntax
Note:
- 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( , ).
- Use correct display name (not internal name) of your SharePoint columns in above formula.
- Wrap column names inside [] if your column name has space in it. For example: [My Column Name].
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Annette1101
Nov 07, 2023Brass Contributor
This was spot on!! Also, I was using the internal name instead of the display name. Thank you so much for the extra notes and links to similar threads!