Sharepoint Validation formula to require data in one of 3 columns, based upon value in another column

Neil 21 Reputation points
2022-11-23T16:59:40.997+00:00

I have a Sharepoint Online form that I need to conditionally display and require entry to 1 of 3 columns, based upon the answer to a previous question. I have the conditional formulas working for display, just need the validation formula to require entry in the displayed question/column and having trouble with this formula.

The all columns involved are single Choice columns.

The simplified phrasing: If Column A is value 1, then Column B must have a value selected, or if Column A is value 2, then Column C must have a value, or if Column A is value 3, then Column D must have a value selected.

I think a simplified individual validation would be =IF[Column A] = "Value1", IF(ISBLANK([Column B]),false,true),true)

That doesn't account for the other scenarios though and I'm really having trouble using an OR statement to put this together. Any suggestions? Or am I approaching this wrong?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,249 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,800 questions
{count} votes

Accepted answer
  1. Yi Lu_MSFT 17,471 Reputation points
    2022-11-24T02:39:05.637+00:00

    Hi @Neil
    You could use the following formula:

    =IF([Column A]="Value1",IF(ISBLANK([Column B]),FALSE,TRUE),IF([Column A]="Value2",IF(ISBLANK([Column C]),FALSE,TRUE),IF([Column A]="Value3",IF(ISBLANK([Column D]),FALSE,TRUE),TRUE)))  
    

    As a result, when [Column A]="Value1" and [Column B] is empty, it will get an error:

    263761-image.png

    when [Column A]="Value2" and [Column C] is empty, it will get an error:

    263684-image.png

    when [Column A]="Value3" and [Column D] is empty, it will get an error:

    263685-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful