1

I am in desperate need of help on this one. I created a custom approval workflow in SPD 2013 where I have two reviewers. The initiator assigns Reviewer 1, and Reviewer 1 assigns Reviewer 2 if they approve the invoice.

In the workflow, after the email is sent to reviewer 1, I put "then Wait for "Event: When an item is changed"" in the current list I am using. Well, today I discover that whenever I start and approve a second workflow after any previous items that are left unapproved, they are triggered to "reject" and it ends the workflow.

Basically any "change" in the list, no matter the item is triggering the workflows to move forward and fail. What I really need is for it to wait until an item is changed in the "current item", but that is not an available choice.

HELP!! Does anyone have any suggestions or ideas that might help. Thanks in advance.

  • Update: I found the "Wait for field to change in current item" list action, but I would need one for approved and another to be for rejected. Either way, it would need to be an OR, not AND. I thought about running them parallel, but worried that it would still require both answers to proceed. – cbbrown Mar 2 '17 at 21:35
0

The first example will wait until the Current Item is changed before moving forward:

Loop: Wait for Current Item Change
    The contents of this loop will run repeatedly while: Variable: boolLoop equals Yes
        Wait for Event: When an item is changed (Output to Variable: guidChangedItem )
        If Variable: guidChangedItem equals Current Item:GUID
            Set Variable: boolLoop to No

Wait until any Item is changed in the selected List. If the changed Item is equal to the Current Item, then proceed, otherwise wait for another Item to change in the selected List.

The second example will wait until the selected Field in the Current List equals Approved or Rejected:

Set Variable: boolBreakParallelBlock to Yes
The following actions will run in parallel:
    Wait for Field to equal Approved
    Wait for Field Name to equal Rejected

Right-click on the Parallel Block and select "Advanced Properties". CompletionCondition specifies how the Parallel Block will end. Set CompletionCondition to boolBreakParallelBlock. If boolBreakParallelBlock is Yes, then all parallel Actions will cancel when one action reaches completion. If boolBreakParallelBlock is No, then all parallel Actions will run to completion.

Parallel Block CompletionCondition

The third example will wait until the Current Item is changed before moving forward:

Set Variable: dtModified to Current Item:Modified
Loop: Wait for current item to change
    The contents of this loop will run repeatedly while: Current Item:Modified equals Variable: dtModified
        Set Variable: dtModified to Current Item:Modified
        Pause for 0 days, 0 hours, 15 minutes

Save the Modified field to a variable. Loop while the Modified field has not changed. Wait 15 minutes before checking if the Modified field has changed. I've seen performance issues using the first example; this example is preferred.

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.