Forum Discussion
SharePoint Online List Column Validation on Multiple Fields Not Working
I'm trying to enforce validation in an out of the box SharePoint list. When a value is selected in a choice column eg. Column A = 1, I want six other columns to become required. The column types are as follows:
Column B: Yes/No Column C: Choice Column 😧 Single line of text Column E: Single line of text Column F: Single line of text Column G: Single line of text
Validation syntax: =IF([Column A]="1",AND(NOT(ISBLANK([Column B])),NOT(ISBLANK([Column C])),NOT(ISBLANK([Column D])),NOT(ISBLANK([Column E])),NOT(ISBLANK([Column F])),NOT(ISBLANK([Column G]))),TRUE)
Issue 1: It doesn't work on Yes/No type of column (Column B) i.e. I can submit the form by leaving it blank, but if I change it to Single line of text it works.
Issue 2: It allows me to submit the form If I select a value in Column C and leave everything else blank.
Issue 3: When I remove Column C from the syntax I can submit the form by leaving all required fields empty.
For issue 1: Tried changing column type to text, it worked but tried on another Yes/No type column, it didn't work. tried on a different list in a different site collection. For issue 2 and 3:
- Tried a different list in a different site collection.
- Tried removing the choice type column and all validation stopped working.
- Tried with just one or two columns, worked fine.
AshMSport Try this:
- Use choice column with Yes and No choices instead of Yes/No (Boolean) column.
- Make sure all your choice columns referred in formula allows single selection only.
- Use formula like:
=IF([Column A]="1",IF(OR(ISBLANK([Column B]),ISBLANK([Column C]),ISBLANK([Column D]),ISBLANK([Column E]),ISBLANK([Column F]),ISBLANK([Column G])),FALSE,TRUE),TRUE)​
Note:
- Sometimes comma( , ) does not work in formula (it is based on language or regional settings of your SharePoint site). So in that case use semicolon( ; ) instead of comma( , ).
- Use correct display 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.
- AshMSportCopper Contributor
ganeshsanap Not working. I'm able to submit the form by filling data in just Columns B and C. Tried using semi colon also, nogo.