In this article, we will learn how to Check if Date Field is NULL or Empty in SharePoint Designer Workflow.
You might also like to read Else Branch Disabled SharePoint Designer 2013
In SharePoint, I have created a SharePoint Designer workflow to check if the value of the Date field is NULL of Empty. therefore I have added “if condition” as shown below:
As you can see, In the date value dialog, there is no option to Check if Date Field is NULL, and you must select a specific date or the today value as shown below
You have three options to check if the current date field value is NULL or Empty in SharePoint Designer Workflow:
- Create a new hidden Date field with a null value.
- Perform if condition with 01/01/0001.
- Create a null date variable.
- In your list, create a new field called “null-date“.
- Before saving, uncheck “Add to the default view” option.
- Open list settings > Advanced Settings.
- Enable “Manage Contents Types“.
- Go back to list setting, and below the “Content Types” click on the “item“.
- Click on the “null-date” field from the columns page.
- Click on “Hidden“.
- Go back to the SharePoint Designer workflow.
- Add an IF condition.
- Set the first value to the date field item and the second value to “null-date” field.
Perform if condition with 01/01/0001
In the SharePoint Designer workflow, the default Empty Date Field value is ‘01/01/0001 12:00 AM‘. So you can check if the date field is less than any old date like “1900/10/01“. in this case, it’s pretty sure that the Date Field value is empty.
Create a null date variable
- Create a Workflow Variable as a String.
- Set this variable to the date field as a short date.
- Compare if the variable equal to the “1/1/0001” (the default date field value)
Conclusion
In conclusion, we have learned how to Check if Date Field is NULL or Empty in SharePoint Designer Workflow.
Applies To
- SharePoint Designer Workflow 2013.
- SharePoint Designer Workflow 2010.
- SharePoint 2013.
- SharePoint 2016.
You might also like to read
- Comments In SharePoint Designer.
- DataView is disabled in SharePoint Designer 2013.
- This o15.officeredir.microsoft.com page can’t be found when Edit List In SharePoint Designer.
- Missing List View Tools In SharePoint Designer 2013.
- Change Workflow Actions language in SharePoint Designer
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
Another option is to add a calculated “Has Date” column testing whether the date field is entered:
=NOT(ISBLANK(DateColumn))
Then, the workflow can simply test whether the calculated “Has Date” field is specifically either Yes or No, and then branch accordingly.
Great Hint
Amazing! Great work