SharePoint workflow – How to check for empty date field

Recently I’ve had to work a lot with SharePoint workflows. During the implementations I am faced a lot of limitations of the SharePoint 2007. There’s a lot of situations when you need to apply workarounds, otherwise you are not able to achieve the goal. I would like to show you one of these limitations and of course I will present the quick and easy solution as well.

So, there was a workflow step when I had to check whether a date field is empty or not. According to the result I wanted to define different actions. Unfortunately in the Designer was no option for that as you can see below.

Compare

In case of the other field types there is the “is empty” option for comparing. So it means somehow we should convert the date type. Fortunately there is a useful activity which is called “build dynamic string”. In the first step we have to build a string from the date field which will be stored in a variable. In the pop-up, where you can define the string, click on the “Add Lookup” button and set the date field what you would like to use later. After that you are able to check whether the variable is empty or not:

is empty

I hope it was useful.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s