1,804 articles and 14,860 comments as of Thursday, May 19th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Thursday, January 14, 2010

How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 4

Dessie Lunsford
Points-of-Sharing 

Case 3

For the final stage of the workflow, we’ll be checking to see if the “Count” value and the “Total Days Gone” value are equal in order to end the workflow.  This stage is representative of an employee returning from vacation (the workflow has ran the same number of times as the total number of days they were gone for and must now end so no more emails are sent).

Click the “Add ‘Else If’ Conditional Branch” link to add in our final conditional check (stage 3).


We’ll start this one off in the same fashion by adding in our check to see if the “Status” equals “On Vacation”.  We’ll also add in the check of is the “Count” greater than “0”, and a third and final check of does the “Total Days Gone” value equal the “Count”.


For the “Actions” to take, add in our pause and email actions, then add in a final “Update list Item” that sets the value of the “Status” field to “Off Vacation”.


Click “Add” and choose “Status” in the “Set this field” dropdown and “Off Vacation” in the “To this value” dropdown then click “OK” twice to return to the workflow settings screen.






Complete the Workflow

We now have our three stages of the workflow.  Each stage will look for a different set of conditions that must evaluate to “True” in order for its “Actions” to be run.  The last stage will set the “Status” field value to “Off Vacation” and since it’s an update, will fire off the workflow once again, but since in each stage we’re looking to see if the value of the “Status” field is “On Vacation”, it will immediately end since all of them will result in “False”.

To complete the design of the workflow and attach it to our list, click the “Finish” button to build, check, and deploy the workflow.


If everything went smoothly, it should build and close the designer window.

Dessie Lunsford
Points-of-Sharing 

 

Please Join the Discussion

7 Responses to “How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 4”
  1. bob e says:

    Good example, thanks just what I have been needing to do,

  2. Trey says:

    Very good example on work flow Dessie, this helped out alot.

  3. Iain Munro says:

    Excellent Dessie

    I jsut got back to the office so will be updating my workflow to match your latest article.

    One question – how does it know to run at a certain time of the day – say 8am each day?

    Iain

  4. Iain,
    That’s in tomorrow’s article :)

    But for you, I’ll give you the answer…when you create an item on the list (the employee “item” thats going on vacation), you set the “Email Reminder Time” value to when you want it to fire off. That’s the field that the workflow will look for. In your scenario, since you want all emails to fire off at 8:00 am, you’d set the value in the field (its a date/time field) to the following day at 8:00 am.

    - Dessie

  5. Iain Munro says:

    Hi Dessie

    Thanks – but I am still having a problem getting it to do this.

    I have tried just adding in 8:00, but it defaults by adding in todays date, whereas the date needs to be the same day the vacation starts at 8am.

    I am still looking to see how I can do this, so bear with me.

    Iain

  6. Iain Munro says:

    Hi Dessie

    I am not sure if it is me, but at the section:

    For the “Actions” to take, add in our pause and email actions, then add in a final “Update list Item” that sets the value of the “Status” field to “Off Vacation”.

    The details that follow it, dont seem to be the same in the Final Workflow image. Can you confirm please.

    Iain

  7. Iain,
    For the first question regarding setting the date, you’ll need to set it for the first “8:00 am” time to come. If you’re creating the item before 8:00 am on the same day, go ahead and let it default to the current date. If its currently after 8:00 am on the day you create the item, you’ll be setting the reminder time to the following day at 8:00 am.

    For the second question, I’m not sure what doesnlt match up. I purposely didnt detail the “Pause” and “Email” actions since they’re the same as detailed in the previous two cases, and the “Update Item” does match up…

    Choose update from the actions menu, click the add button then choose “Status” in the first dropdown and “Off Vacation” in the second dropdown then click “OK” twice to get back to the designer.

    Is there something I missed?

    - Dessie


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!