Question

If column [Status] = 'Approved' then [Run Date] must be >= today()

I cannot seem to get the syntax for this validation correct. Can anyone help out?

I understand the validation has to return true.

Était-ce utile?

La solution

I think you should take a look at the validation functions for SharePoint. It's very similar to Excel.

A reference for Validation expressions

A couple things to keep in mind:

  • Validation equations must return True or False
  • Column validations can't refer to other columns (in this case you'll need to do a List validation, not column validation)

So we'll need some sort of boolean statements returned... I'll assume your statement is to return True if [Status] not equal to "Approved" Try something like the following:

if( [Status]="Approved", [Run Date]>=Today(), True )

Autres conseils

Assuming that you are looking for list validation formula, the formula would look like below. Here is a support article from Microsoft on formulas

=IF(Status="Approved",IF(RunDate>=TODAY(),1,0),0)
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top