Hi friends, in the previous tutorial of SharePoint 2013 we have seen how to Show/Hide fields based on the value of other fields. Today we are going to learn how to make Conditionally require data in SharePoint 2013. Have you ever needed to make one or more fields to be mandatory depending on the value of another field? If your answer is yes, then this post is for you! Let us see how to make the Conditionally mandatory field in SharePoint 2013.

Here we are going to make "Favourite flavour" column mandatory when the user selects "Do you like Ice Cream" as YES. If the user selects NO "Favourite flavour" field will no longer remain mandatory. Isn't it interesting? Let us see how to implement this scenario in SharePoint 2013.

Conditionally Mandatory Field in SharePoint 2013


Let us create a list named "Delicious Desserts". This list has two columns as "Do you like Ice Cream" as radio buttons and "Favorite Flavor" as a text field. Here we are making "Favourite Flavour" field conditionally required.

New Item Form in Sharepoint 
Now click on List settings > Validation Settings (under General Settings heading).

validation settings in SharePoint

Here you can enter the formula for validations. You can also put a message for the user when he tries to save the item without filling that required field.

Now copy the following formula, replace column names with yours and paste it in formula field as shown in the screenshot. Also, set User message so that user can also understand which one is a mandatory field.
=IF([Do you like Ice Cream]="Yes",IF([Favourite Flavour]<>"",TRUE,FALSE),TRUE)

Validation formula in Sharepoint 2013 for Conditionally Mandatory field

See the below screenshot. Here User gets a message like "Please mention your favorite flavours" when he tries to save the form after selecting YES for the question "Do you like Ice Cream". In this way, we can implement Conditionally Mandatory field in SharePoint.

Validation for conditionally mandatory fields

If you want to validate multiple fields that depend on two or more other fields, OR condition, AND condition, etc. you can easily create a formula by referring to these calculated field formulas.

If you like this article, please share it with your friends and like or facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!