You can achieve it using List Validation
functionality in SharePoint:
Below are the steps to configure List Validation:
- Go to SharePoint list
- Click on
Settings
icon and select List settings
- Select
Validation settings
- Add formula & user message and click Save
You can add below formula:
=IF(AND([Status]="Completed",ISBLANK([Actual End date])),FALSE,IF(AND(NOT([Status]="Completed"),NOT(ISBLANK([Actual End date]))),FALSE,IF(AND(ISBLANK([Status]),NOT(ISBLANK([Actual End date]))),FALSE,TRUE)))
You can set validation message according your requirement
Above formula will handle following scenarios:
- It will not allow to set Actual End Date when Status is not Completed or it's empty
- It will now allow to blank Actual End Date when Status is Completed
See below output