1,316 articles and 8,704 comments as of Thursday, January 14th, 2010

Wednesday, January 13, 2010

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

Dessie Lunsford
Points-of-Sharing 

Case 2

In the workflow designer, click on the “Add ‘Else If’ Conditional Branch” link.


Following the exact same steps listed in the first condition and actions, add in everything a second time with the exception of instead of “and Count equals 0”, set it to “and Count is greater than 0” for the second condition (do this by clicking on the “equals” link and choosing “is greater than”) and adding in a third condition of “and Total Days Gone not equals Employee Vacations:Count” (for this, click “Conditions” and select “Compare Employee Vacations field”, click the “field” link and choose “Total Days Gone” from the dropdown, click the “equals” link and choose “not equals”, click the “value” link then the “fx” button, then choose “Count” in the “Field” dropdown box then click “OK”).


When complete, you should have two conditions that appear similar, but in the second one it will be checking for three conditions (is the employee’s status “On Vacation” and is the “Count” greater than 0, and does the “Total Days Gone” value not equal the current “Count” value).  This condition (stage) is specific to an employee who is currently on vacation and the workflow has already run at least once, but is not completed yet.

Dessie Lunsford
Points-of-Sharing 

 

Please Join the Discussion

6 Responses to “How to get an SPD Workflow to Run at a Specific Time – Employee Vacation Reminder: Part 3”
  1. Iain Munro says:

    Hi Dessie

    This is looking great.

    I am looking forward to it running on my site.

    I still have one problem that there seems to be a lot of talk about, but no real solution and that is auto countdown. In your suggestion, you have a column called Sattus – for On and Off Vacation. I dont have this becuase I have To and From date columns. So I need a statement that will check for the From being less than Today and change the status from On Vacation to Off Vacation.

    And we all know the issues with the Today statement.

    If you can help, I would appreciate it.

    Iain

  2. Iain,
    That is why I’m using the “Count” column along with the “Total Days Gone” column, and the “Status” column.

    The “Total Days Gone” is a count of how many days the employee will be on vacation (the difference between the “To” and “From” date columns in your scenario).

    The “Count” column will be updated each day after the workflow runs in order to keep track of many days the Employee has been on vacation (this takes place of the “today” issue). So, the calculation taking place will be looking to see if the “Count” is less than the total days the employee will be gone for (kind’ve like comparing “today” to the “To” date). Once the two are equal (”Count” and “Total Days Gone” column values are equal), the workflow will update the “Status” to “Off Vacation” – which will terminate the workflow.

    Does this help some?

    - Dessie

  3. Iain Munro says:

    Hi Dessie

    Excellent – what kind of threw me was the fact that I already had a number of fields already done – did not have status column though. So I created that. I have a list that show people out today, so I used the same formula in a workflow to set the status to on vacation, so I think it will work.

    While I know there is still something coming tomorrow, the workflow is working. I did get two emails today for the two people that are out on vacation.

    Next question and maybe it is coming tomorrow – so I will wait until then to ask.

    Thanks again.

    Iain

  4. Iain Munro says:

    Hi Dessie

    IJust to update you, i created a test view with all the coulmns – one thing I noticed was that the Email Reminder Time is 1/1/1900.

    Iain

  5. Iain,
    Is your “Email Reminder Time” column just a standard Date/Time column? It serves as a lookup that the workflow uses as its starting time, so it should be just a standard date/time column that when you create a new item on the list, you enter in the starting date and time that you want the workflow to start at. Once the workflow has ran, it will just increment that date by one so it’ll wait a full day, then fire off again.

    Re-check what your column actually is, then make sure you have the action in the workflow set correctly so it’ll add 1 day to the value.

    - Dessie

  6. Trey says:

    The comments in this post were very interesting and was a good way to help point me in the right direction on how to clean up my colums for the site. Thank you to both of you.


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!