Quantcast
Channel: SharePoint Legacy Versions - Using SharePoint Designer, InfoPath and Other Customizations Forum
Viewing all articles
Browse latest Browse all 2319

How to deal with an empty "date" field in a Workflow.

$
0
0

I am new to SharePoint Designer and have run into a problem strategizing a Workflow. 

My scenario: I'm elevating a task from one list to another. I need a Workflow to pause the movement until a specific "Move On" date has arrived.  

 

This is a Yes/No situation in the form. If the user chooses "No" (the default) the workflow stops - no actions are taken. (this part works fine) If the user chooses "Yes" and enters a "Move On" date, the workflow continues and moves the task on the date. (this part also works fine)

The Problem: I'm anticipating User Error. The user checks "Yes" but dosn't enter a "Move On" date. Which means the workflow continues, and since there is no date, there is no pause. The task is moved without delay. 

I can't pre-set the "Move On" date, because the user needs to set it. I can't make the "Move On" date field required because if the user says "No" there's no need to have a date. 

I need the user to check "Yes" and fill in a date.  (Basically if "Yes" is checked, the Date field needs to be required. I'm not sure I can do this in my task list form.)

My Workflow needs to check if the "Move On" date field is empty and then stop the workflow without moving the task. The date really needs to be there to indicate when the task needs to move, without it it needs to remain where it is. 

I found a thread that had a similar problem with an empty date field, but couldn't decipher the solution. The suggestion was to: 

"Simply add an action to a PREVIOUS STEP that Sets a workflow variable to the value of the Date field and choose the String data type.  This converts your date to a string, which you can then compare against in your condition on a LATER STEP.  You can say 'If Variable:Date is not empty.'"  (or in my case "If Variable: Date is empty.") 

I'm not sure if this is something that would work for me, and I'm so new to this, that I'm a little lost. 

If this is a solution, I'll need either some instruction or direction to references that can help me understand more about variable settings and what a "String data type" is, and what it does. 

Thank you. 

 

PS - If there are other strategies that might do what I need the Workflow to do, any help would be appreciated. 

 

 


Viewing all articles
Browse latest Browse all 2319

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>