Null value in date field – SharePoint designer 2013

by | Aug 23, 2013 | SharePoint | 0 comments

Checking for a NULL Date Field in SharePoint Designer Workflow it can’t be done with some strict operation. I create workflow for SharePoint online with SharePoint designer 2013. It’s nothing fancy, many of us making such things, but finally I faced problem without solution. Client wants to limit direct operation on Workflow task list. If the item has been updated in proper way task should be mark as complete by workflow itself. It’s easy to achieve with Visual Studio, there’s on element “workflow item change”, but how to do this with SharePoint designer? Well, it’s not so difficult, we can use list action ”Wait for Field Change in the Current Item”. It works.

image

We will have a problem when the field is date type. Default behavior for this action is that field has to be equal specific value, but there’s no condition for “is not null”. So what to do? I’ve seen many complicated solutions, but I prefer something simple. So here’s…

The SharePoint designer 2013 finally has loop option. It’s very useful and for example if you write workflow with visual studio you probably used it. Anyway we need declared variable to exit the loop. So let’s create one:

image

And in first step of the workflow let’s initialize it with value equal 1. Now we have to add loop step. We have two possible loops, one of them runs n times and the second one runs until condition is true. We will use the second one. As you can see I use workflow variable which equals 1 and until it will be equal 1 it will run. Now the loop waits until date field will be greater than 1901-01-01, which in my case means that user enter new date to the field. When it will happen also loop exit variable will be set to 0, which create condition to exit the loop.

image
[adblockingdetector id=”5770e6ed85560″]
And finally we can mark task as complete.

Written by Tomasz Szulczewski

Hi, my name is Tomasz Szulczewski, and I have been in love with information technology for over 25 years, but I still have an IT passion and feel like a geek. I am a person who is problem solver who thinks that not all people must be experts in IT.

Related Posts

What is SharePoint in Office 365?

What is SharePoint in Office 365?

What is SharePoint in Office 365, and why is SharePoint for small business the critical product? So you bought a Microsoft 365 license, and your tenant is online. You open a browser, and you have no idea what to do next? Don't worry; I will try to give you a few...

read more
Hubfly

Hubfly

A few days ago I have a chance to play with SharePoint online solution called Hubfly and I was really impressed with his capabilities. And here is my review. So let’s start from the begging. I wrote a few times on this blog that the main problem with SharePoint is...

read more

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.