0

Been hitting my head on a brick wall with this... First off I only have access to SharePoint Designer 2007, I do not have the required access to implement add-ons such as those offered by CodePlex...

Essentially I'm creating a custom approval workflow on a doc library with enforced check-in/out. The approval workflow itself works fine... (note: workflow 1 is started manually)

Where I am getting a problem is once the document has been approved and further changes are made I want the item status to change back to 'In Progress'.

To this effect I have created workflow 2 which triggers when an item is modified however as workflow 1 (Approval) modifies the item the second workflow auto kicks in.

I have tried to get workflow 2 working via a 'Review Status' hidden field (accepted values 0, 1).

  1. Workflow 1 > if Item Approved > Review Status = 1
  2. If Item Changed by end user > Workflow 2 auto starts > Review Status = 0 > change item status to 'In Progress'

In reality this is what happens:

  1. Workflow 1 > if Item Approved > Review Status = 1 > but item also changed by workflow 1
  2. Workflow 2 auto kicks-in so Review Status is changed back to 0

Any help on this would be greatly appreciated :)

migrated from stackoverflow.com Apr 4 '16 at 21:29

This question came from our site for professional and enthusiast programmers.

  • Is it possible to start Workflow 2 only when a specific column is changed or do you need it to trigger when ANY change is made? – Alex Chance Mar 25 '16 at 16:38
  • Workflow 2 must detect any changes to the uploaded document e.g. end user checks out > makes a change > checks back in – David Mar 25 '16 at 18:44
  • I have not tested this but maybe you can put an if statement checking the "Modified By". There should be an option to choose the system account, which I think is what it marks it as when a workflow runs. – Alex Chance Mar 25 '16 at 20:42
  • Unfortunately the 'modified by' will display the end user's credentials rather than the 'system account' – David Mar 26 '16 at 14:15
  • This has however given me an idea re identifying changes made by a workflow. As workflow 1 checks in the item and adds a check-in comment I could simply make that comment unique so workflow 2 only kicks in when 'Approval Status' = 1 and check-in comment does not match check-in comment entered by worklow 1. Will test this and post back... – David Mar 26 '16 at 14:20
0

Isn't it possible to wrap the actions in workflow 2 inside an if condition? This if condition should check a hidden column value which can be set to 'yes' from workflow 1 and to 'no' when user modifies it.

  • In SharePoint 2007 how would workflow 2 distinguish between a user vs a workflow modifying an item ? Currently workflow 1 sets the 'review status' (hidden column) to 1 but also in the process modifies the item which then triggers workflow 2 to detect a change and assume an 'end user' has made it. I guess the question is how do I get workflow 2 to distinguish between a Worklfow making a change (which impersonates a user) and an actual end user ? – David Mar 25 '16 at 18:37

Your Answer

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