3

I hope someone can help me with my issue I cant manage to solve. I am using SharePoint 2010 and SP Designer to create a workflow.

My questions is how can I create a workflow which starts upon status value in Status column changes in document library? I need two different workflows to be automatically started depending on selected value in the Status.

My status column has following options:

  • Draft (no workflow required)
  • For review (feedback workflow required)
  • For approval (approval workflow required)

    Workflow to be started as following:

1st step : When user changes the value in Status to "For review" the Feedback workflow will start automatically and sent out the email notification to initiator and receiver with the instructions what to do and upon completion email notification with completion message will be sent to all.

2nd step: when user changes the value in Status to "For approval" the Approval workflow stats automatically and sent out the email notifications to initiator and receiver and again upon completion email will be sent out to initiator and receiver.

I have tried following but the workflow doesn’t work the following actions will run parallel:

If current item:Status equals For Review Start Feedback process on Current Item with these users

If current Item:Status equals For Approval Start Approval process on Current Item with these users

I have also tried Else if with the same structure and also separating the above ifs to different steps, non of it works and I am not sure how to create such a workflow which will automatically do what I need.

  • just one question, do you have tasks also in this? – Gaurravs Dec 21 '15 at 16:42
  • assume so... as approval and feedback workflow are based on tasks. I am using predefined workflows which are standard in SPD when you use the action "start approval process" or "start Feedback process" – Helena Dec 22 '15 at 12:00
1

thanks for your respond.

Is it possible to merge the two workflows into one, saying using the “Wait for item to change”

Sot the workflow would look like this:

enter image description here

I am not sure if this is the right way how to write the workflow as I am not very familiar with it.

Or do you have to have 2 different workflows assigned to the list and in each you will have the function “Wait for item to Change” before you start the workflow?

Many thanks for the respond.

Helena

  • There is no reason why you couldn't do the above. It would work just fine. I had suggested two workflows because the way you described it, you made it sound like you wanted to separate out the processes. – David Drever Dec 22 '15 at 13:52
  • Thanks David, only Issue is that the workflow is pending and Waiting on Status even though I do change the status, it still shows as pending. Any idea why? – Helena Dec 22 '15 at 13:56
  • Not off the top of my head. Does it occur at the first stage or second stage? Does it happen all the time? The only time I have seen this happen is when the field I was attaching to was a checkbox. I usually attach to a drop down box. Is the field you are attaching to a drop down or a text field? – David Drever Dec 22 '15 at 14:31
  • - Status field is drop down field. - changed the workflow setting to start workflow automatically when an item is created and changed, before it was also covering manual start (which I do not want – my mistake) - now the workflow works for review only, not picking up the approval workflow. – Helena Dec 22 '15 at 14:57
  • hmm, I don't know if this is a limitation on the SharePoint 2010 WF engine. The reason I say that, is because I have a SP 2013 WF that has about 4 wait for value to change and it works fine for all of them. It is not ideal, but could you possibly break it out into two WFs. One that looks for the review and one that looks for the For Approval. When the review is complete, it updates the field to the required value which releases the second WF. I am curious if the 2010 WF simply has issues with two "waits" on the same field in the same WF. It may not be able to add a second listener – David Drever Dec 22 '15 at 15:55
0

What I have done in the past for this is not to try and figure out how to start a WF depending on the value, but have the WF actually kick off immediately, but wait until the value changes on a particular column before continuing on.

In SP Designer 2010 you have the option to have the WF wait. The action is called "Wait for Field Change in Current Item". You can then set the column you want it to wait for, the operator (ex. To equal, to not equal, to be empty, etc) and the value for the comparison.

So basically what I would do in your situation is when the item is added, kick off two workflows. One for "review" and one for "approval". Immediately on start, log that the WF has started and is waiting for the value in to change to . The next step is simply adding the action Wait for Field Change in Current Item. Set the values to Status, to equal, "" (sorry, I don't have 2010 installed so don't have screen shots). Do this for both WFs. Once the status is updated, the WFs will then continue on, when the values they are waiting for are set.

Please note, this does increase the risk of WFs sitting there indefinitely if the item is never updated so you may want to create a view on the status field to monitor when the item has been sitting there for a while with no updates and monitor the view periodically.

Hope this helps,

Dave

0

After your Current item is reviewed, why not just have the approval start automatically after the review, without the "Wait for Status to equal for Approval." By taking that statement out the approval will only begin right after the review. I have that for my workflow which is an Approval and then Review and works fine.

** I enabled "Request Change" in SharePoint Desighner 2010 for any changes to be made and until they are made and accepted it will not automically shift to the next step. **

  • good point and great solution, but not all of the document will be sent for review, some might be sent directly for approval, therefore I was requesting 2 workflows for same field – Helena Dec 22 '15 at 16:05
  • Got it ! Then yes my way does not make sense what you could try now is an Else If Statement. If "___" Field is Review then start Review Process Else if "______" is Approve then start Approve Process and paralell to that you can make it that when the status field is changed it goes through the process you prescribe it to. – VKay Dec 22 '15 at 16:08

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.