Forum Discussion
SharePoint list column validation - if status is a certain value, require a date in another column
- 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.
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.
- Annette1101Nov 07, 2023Brass ContributorThis 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!
- mrjarrarMay 03, 2024Copper Contributor
Hey ganeshsanap,
I've followed these steps in order to make one of my SharePoint lists columns mandatory if the value "Yes" is entered in another using this formula "=IF([FFE_x002f_ICAT_x0020_Impact]="Yes", NOT(ISBLANK([FFE_x002f_ICAT_x0020_MRP_x0020_Notified])), TRUE)".
However, I keep getting the following error: "The formula cannot refer to another column. Check the formula for spelling mistakes or update the formula to reference only this column."
Any help with this would be greatly appreciated 🙂- ganeshsanapMay 06, 2024MVP
You are using internal name of list columns in formula. Use correct display name (not internal name) of your SharePoint columns in above formula.
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.