SOLVED

SharePoint list column validation - if status is a certain value, require a date in another column

Brass Contributor

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 tried entering this into the Validation Setting, but I keep getting the "Sorry., something went wrong.." message.

=IF(AND(OR([Status]="Sold",[Status]="Disposed"),ISBLANK([OutOfService]),TRUE,TRUE),FALSE)

Obviously, I have the statement incorrect. Any help would be greatly appreciated!!

5 Replies
best response confirmed by Annette1101 (Brass Contributor)
Solution

@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

  1. How to have validation for SharePoint list column? 
  2. SharePoint List validation formula 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 (not internal 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].

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.

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!

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 🙂

@mrjarrar 

 

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.

1 best response

Accepted Solutions
best response confirmed by Annette1101 (Brass Contributor)
Solution

@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

  1. How to have validation for SharePoint list column? 
  2. SharePoint List validation formula 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 (not internal 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].

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.

View solution in original post