Check if Date Field is NULL or Empty in SharePoint Designer Workflow

In this article, I will show How to

Check the date field is NULL or Empty in SharePoint Designer Workflow


Scenario

In SharePoint, I have created a SharePoint Designer workflow to check if the value of the Date field is NULL of Empty.

I have added “if condition“,

Check date is empty in SharePoint Designer Workflow

Unfortunately, there is no option to achieve that, you must select a specific date or the today value as shown below

Date is empty in SharePoint Workflow designer


Solution

You have three options to check if the current date field value is NULL or Empty in SharePoint Designer

Check Empty Date in SharePoint Designer Workflow

  • In your list, create a new field called “null-date“.
  • Before saving, uncheck “Add to the default view” option.
  • Open list settings > Advanced Settings.

Advanced Setting in SharePoint List

  • Enable “Manage Contents Types“.

Allow management of content types

  • Go back to list setting, and below the “Content Types” click on the “item“.

Content Types - Item.png

  • Click on the “null-date” field from the columns page.
  • Click on “Hidden“.

Hide column in SharePoint List

  • Go back to SharePoint Designer workflow.
  • Add an IF condition.
  • Set the first value to the date field item and the second value to “null-date” field.

blank date in SharePoint Designer Workflow


Check NULL Date in SharePoint Designer Workflow

In 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.

Check the NULL date in SharePoint Designer Workflow

Alternatively, you can

  • Create a Workflow Variable as a String.
  • Set this variable to the date field as a short date.

Check blank date in SharePoint Designer Workflow

  • Compare if the variable equal to the “1/1/0001” (the default date field value)

Check blank date in SharePoint Designer


Applies To
  • SharePoint Designer Workflow 2013.
  • SharePoint Designer Workflow 2010.
  • SharePoint 2016.
  • SharePoint Online
Advertisements

2 thoughts on “Check if Date Field is NULL or Empty in SharePoint Designer Workflow

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s