locked
Trying to set up Site Validation based on a Choice and Date fields RRS feed

  • Question

  • I have the situation in a form where I pose the question "Is this a contractual requirement" and give a Choice field to chose Yes or No. If they answer Yes I need it to be required that they enter a date in the Date field "Due Date". In my internet searching I found where this is best accomplished via Site Validation and a variation of the code {=IF([Field1]="Yes",IF([Field2]<>"",TRUE,FALSE),TRUE)} was given as an example.

    Since this didn't deal with dates it wasn't exactly like what I needed but further research led me to adopt it to this {=IF([Choice Field]="Yes",IF(ISBLANK[Date Field],TRUE,FALSE),TRUE)}. This code does not work I get an error advising me there is a Syntax issue and as I am new to coding in SharePoint I can't figure out where to start troubleshooting it. 

    Any assistance would be greatly appreciated. 

    Wednesday, May 1, 2019 3:38 PM

Answers

  • Hi RLDeaton,

    May I ask that how did you set up the Site validation?

    If you set the list validation, then you could use the validation as below. You should use “()” for ISBLANK.

    =IF([Choice Field]="Yes",IF(ISBLANK([Date Field]),TRUE,FALSE),TRUE)

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, May 2, 2019 3:03 AM

All replies

  • Hi RLDeaton,

    May I ask that how did you set up the Site validation?

    If you set the list validation, then you could use the validation as below. You should use “()” for ISBLANK.

    =IF([Choice Field]="Yes",IF(ISBLANK([Date Field]),TRUE,FALSE),TRUE)

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, May 2, 2019 3:03 AM
  • Hi RLDeaton,

    If the reply is helpful to you, you could mark the reply as answer. Thanks for your understanding.

    Best regards,

    Sara Fan

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, May 3, 2019 2:04 AM