0

I would like my workflow in SP Designer 2013 to only run if it is within 7 days of my column [Hire Date], otherwise, pause until that date. I see how to create the column if it is exactly 7 days from the hire date, but if the item is created 3 days before, I'd like it to run as well. I need a statement like "If t[Current Date] is 7 days or fewer from [Hire Date] then start workflow, Else, pause until 7 days before. My current column is =DATE(YEAR([Hire Date]),MONTH([Hire Date]),DAY([Hire Date])-7) How can I make it "or 6,5,4,3,2,1" days?

1

A possible way of doing this would be:

  1. Within your workflow create a local variable called "PauseUntilDate", and get its value as PauseUntilDate = Hire Date - 7 days

  2. Next write a pause until statement to make the workflow wait until "PauseUntilDate"

  3. If the "PauseUntilDate" is yet to come, the workflow will begin execution on the designated date.

  4. If the "PauseUntilDate" has already passed, the workflow will realize this within about 5 minutes and run the next statement.

And of course, delete the calculated column, you don't need it anymore.

4
  • Where do I add the value to the local variable? I don't think I've run into that before. Can I do that out-of-the-box with SharePoint Designer 2013?
    – markasey
    Apr 16 '16 at 0:46
  • Have a look at this: sharepoint.stackexchange.com/a/144674/51055 The answer explains how you calculate dates with SP designer. In your case the calculation is quite simple.
    – Nisarg
    Apr 16 '16 at 3:32
  • Maybe this is clearer: First, use the "Add time to date" action, with Add -7 days to [Hire Date] output to variable PauseUntilDate, then Pause until action with PauseUntilDate variable.
    – Erin L
    Apr 18 '16 at 18:50
  • I won't mind if you edit. :)
    – Nisarg
    Apr 19 '16 at 15:36
0

Variables will solve your problem:
- First you should make a Variable call (-7Day) which is Hire Date-7. (which is the exact start date)
- make your work flow on this condition:

IF [Current Time] equal or greater than [-7DAY]

- then the actions which you need to be done in next step

0

You can try making the workflow pause based on a boolean field calculated with following formula;

=IF((DATEDIF([Hire Date], Today(),"d") <= 7),"")

Read more about principals used here

and

stackoverflow answer

Please Note: This solution will only work if workflow is triggered on item create or item update.

7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.