How to validate a column in Sharepoint to it can be mandatory when another column is filled with a specific information?

Anonymous
2024-12-04T17:26:49+00:00

I am not being able to validate a column in sharepoint. I have a column named "Status" and once the option "deficiency" is selected at that column, I want the column "Deficiency Deadline" to be mandatory. Whit that, I added the following formula to the validation field of the "Deficiency Deadline" column, however, not working: =IF([Status]="Deficiency", NOT(ISBLANK([DeficiencyDeadline])), TRUE). Does anyone know how to write this formula so it can work?

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

13 answers

Sort by: Most helpful
  1. Anonymous
    2024-12-04T21:43:14+00:00

    Hi Lais Dutra,

    Thanks for posting in the community. We are happy to help you.

    According to your description, since the date column's name is "Deficiency Deadline", you seem to be missing a space in [DeficiencyDeadline]. I suggest you add a space and check again, as shown below. In addition, I have tested it on my end and it works as expected.

    =IF([Status]="Deficiency", NOT(ISBLANK([Deficiency Deadline])), TRUE)

    ![](https://learn-attachment.microsoft.com/api/attachments/ed20ef8f-9dba-4866-9301-1176beecb987?platform=QnA"2">

  2. Make sure that the option "Deficiency" in the Status column is the same as the value in the formula.

To verify this, you can edit the Status column and carefully compare this option to the value "Deficiency" in the formula.

If the problem persists after checking the above points, I would like to gather more information to troubleshoot.

  1. You mention the formula does not work. I would like to know if you mean that when the save button is clicked, the page returns any error messages Or you can save the formula on the Validation Settings page but the formula doesn't work as expected.
  2. I would like to know if the main language of your company is not English. Because it is possible that the default language of the site is not English (even if on your side the site is displayed in English), which would require changing the symbols in the formula.

We look forward to your response. Thanks for your cooperation. 😊

Sincerely,

George | Microsoft Community Moderator

0 comments No comments
  • Anonymous
    2024-12-05T14:09:02+00:00

    Hi George, thanks for your feedback!

    My column Deficiency Deadline has as a field name "DeficiencyDeadline" all together. Anyway, I have tried both ways, with space and without space and it does not work. I am based in Brazil and have tried in Portuguese also with no success. By the "formula does not work" I mean that once I click save, it gives me an error page “Something went wrong. The formula is not supported or it contains a syntax error.”

    0 comments No comments
  • Anonymous
    2024-12-06T01:24:37+00:00

    Hi Lais,

    Thanks for posting back.

    To verify if you need to add the space in the field name, you can go to the Validation Settings page and check if there is a space in the field name in "Insert Column".

    I assume [DeficiencyDeadline] is the correct field in the formula. Based on your reply, since you are in Brazil, the formula function names in Portuguese will be different from the English formulas. I recommend you try the following formulas in Portuguese and then check again.

    =SE([Status]="Deficiency";NÃO(ÉCÉL.VAZIA([DeficiencyDeadline]));VERDADEIRO)
    
    =SE([Status]="Deficiency",NÃO(ÉCÉL.VAZIA([DeficiencyDeadline])),VERDADEIRO)
    

    If the error message still appears after trying the above formulas, I suggest you split the formula into different parts to troubleshoot the problem. Please try the following formulas on your end and check if you can save which formula does not show an error message. You can share the test results with us.

    The English formula:

    =IF([Status]="Deficiency",FALSE,TRUE)
    

    The Portuguese formulas:

    =SE([Status]="Deficiency";FALSO;VERDADEIRO)
    
    =SE([Status]="Deficiency",FALSO,VERDADEIRO)
    

    We look forward to your response. Thanks for your cooperation. 😊

    Sincerely,

    George | Microsoft Community Moderator

    0 comments No comments
  • Anonymous
    2024-12-06T12:43:14+00:00

    Hi George,

    Thanks so much for you attention on that! I have checked and it would be Deficiency Deadline "with space". I have tried all the formulas you sent me and none of them worked, the same error message appears when I click save: Something went wrong. There is no support for the formula or it contains a syntax error.

    Thanks,

    Laís

    0 comments No comments
  • Anonymous
    2024-12-06T16:08:40+00:00

    Hi Laís,

    Thanks for posting back.

    If none of these formulas work, I would like to gather more information about the situation.

    1. Provide the column settings of the "Status" column

    In the list, click the down arrow of the column> Column settings> Edit, take a full screenshot of the "Edit column" pane, and upload the screenshot via "Insert Image".

    1. Provide the column settings of the "Deficiency Deadline" column
    2. Provide a full screenshot of the Validation Settings page.

    Make sure the "Insert Column" box in the screenshot shows the two columns.

    We look forward to your response. Thanks for your cooperation. 😊

    Sincerely,

    George | Microsoft Community Moderator

    0 comments No comments