8

I have an approval workflow in a document library. It's manually started by the user because they may not want to start it everytime they edit a document.

The workflow is as follows:

If for UK 

Start approval process with John

Else if for US 

Start approval process with Diane then Jim

It works just fine so far, but if a user edits a document, it still shows as approved which it has not been since there were edits. I'm trying to figure out a solution so that when a user checks in a document that has been edited, the approval status changes back to Pending until it goes through one of the approval processes again.

Any ideas? I haven't been able to find a solution online anywhere or in any of my books.

0

I assume while creating the workflow you have selected "Allow this workflow to be manually started by an authenticated user with Edit Item permissions.".

Basically you are handling the OnItemAdded part.

In your existing workflow, you might have selected "Start this workflow when a new item is created."

Simillarly, you also have to handle OnItemUpdated part

Create a new workflow with same email sending conditions with option "Start this workflow when an item is changed."

OR

You can modify the existing workflow to handle both Added & Changed scenarios.
  • I have the manual option checked, however, I don't have the "Start when new item is created" checked because I don't want it automatically started, ever. I guess I could set up a new workflow so that when an item is edited, the approval status is set to Pending or null. Think that might work? Can I do that in SP Designer and not VS? – Keith Mar 11 '13 at 13:11
  • why dont you just add it to the existing workflow if edit return to step x? – Raoul Mensink Apr 11 '16 at 12:18
0

workaround

Create hidden column with name ItemIdentifier. default value empty

  1. When workflow started, set ItemIdentifier value empty
  2. check if ItemIdentifier is empty, if value is empty then set workflow status to Pending
  3. When workflow is approved then set value of ItemIdentifier to Approved. Then set workflow status to Approved

Hence after workflow is approved and user edit the item then workflow status will be Pending

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.