Just like column validation we can have validation formulas at list level. Column validation can only validate the current column and can not perform validation for other columns. For applying validation on multiple columns, you would need SharePoint’s List or Library level validation.

Why need List Validation

There is possibility that data entered in list fields is correct while submitting the form but entered value is not correct if compared with other values in the field.

The simplest is Start Date and End Date fields, user can enter date values properly in both fields but there is possibility of adding wrong date ranges. With the help of List validation, we can compare that End Date must be greater that Start Date.

Applying List Validation

For applying list validation, I have created two columns Start Date and End Date of datetime in my SharePoint lists. Follow below steps to do the list validatioj:

  • Click on Gear icon and go to list settings (for older SharePoint version, select list settings from ribbon)
  • Under General, click on Validation Settings
  • Now select the fields form Insert Pane to the Formula Pane
  • I have added date comparison formula as =[End Date] > [Start Date]
  • Enter validation message in User Message pane.
  • Save the changes

Now go to the list and add new item to validate the working of the list validation.

Adnan, a distinguished professional, boasts an impressive track record as a Microsoft MVP, having achieved this prestigious recognition for the eighth consecutive year since 2015. With an extensive career spanning over 18 years, Adnan has honed his expertise in various domains, notably excelling in SharePoint, Microsoft 365, Microsoft Teams, the .Net Platform, and Microsoft BI. Presently, he holds the esteemed position of Senior Microsoft Consultant at Olive + Goose. Notably, Adnan served as the MCT Regional Lead for the Pakistan Chapter from 2012 to 2017, showcasing his leadership and commitment to fostering growth within the tech community. His journey in the realm of SharePoint spans 14 years, during which he has undertaken diverse projects involving both intranet and internet solutions for both private and government sectors. His impact has transcended geographical boundaries, leaving a mark on projects in the United States and the Gulf region, often collaborating with Fortune 500 companies. Beyond his roles, Adnan is a dedicated educator, sharing his insights and knowledge as a trainer. He also passionately advocates for technology, frequently engaging with the community through speaking engagements in various forums. His multifaceted contributions exemplify his dedication to the tech field and his role in driving its evolution.

Leave a Reply