SOLVED

SharePoint Column Validation

Copper Contributor

Hello SP community,

 

I want to validate that the users select either "Pre", or "Post" choice if they selected Yes to a previous column.

 

I've created two a choice column, one is a Yes/No choice, and the other is "Pre" or "Post". When a user selects "Yes" in the first column I want to validate that they also select either "Pre", or "Post" in the following column. If they selected No, then they aren't required to select "Pre" or "Post".

 

I am not sure if this is possible or maybe there is another solution rather than using column validation? I was thinking a calculated column, but they have two choices after selecting "Yes". 

 

Thank you!

 

3 Replies

@SXT3410 This is possible using List validation settings. You can use formula like: 

 

=IF([Column 1] = "Yes", OR([Column 2] = "Pre", [Column 2] = "Post"), TRUE)

 


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.

best response confirmed by SXT3410 (Copper Contributor)
Solution

@SXT3410 

Note: You have to add this formula in List validation settings and not column validation settings.

Follow below steps:

  1. Go to SharePoint list
  2. Click on Settings icon and select List settings
  3. Select Validation settings
  4. Add formula & user message and click Save

 

ReferenceList validation if then syntax 


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.

I tested the formula, and it works as intended! Thank you also for the note @ganeshsanap, I wasn't aware of the validation setting. :smile:

1 best response

Accepted Solutions
best response confirmed by SXT3410 (Copper Contributor)
Solution

@SXT3410 

Note: You have to add this formula in List validation settings and not column validation settings.

Follow below steps:

  1. Go to SharePoint list
  2. Click on Settings icon and select List settings
  3. Select Validation settings
  4. Add formula & user message and click Save

 

ReferenceList validation if then syntax 


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