Moving documents between lists in a SharePoint Designer workflow

systems_mitsui
systems_mitsui used Ask the Experts™
on
High, I am creating a document approval workflow in sharepoint designer 2007. We currently have WSS 3.0 deployed in a small sharepoint farm .

Set up is a followes on the SharePoint site:

Four lists
First list is called Pending. Second list is called Approved, third list is called rejected and forth list is callled Tasks. There is also another list created by SharePoint when setting up the workflow called Tasks1.

OK, so in SharePoint designer I have the following workflow that starts auto when item/document is added to pending list. An e-mail is sent to a certain user telling them they have some documents to review and a copy of the item/document is placed into Tasks1 (I deleted the tasks list as I thought it  best to use the task1 list sharepoint created)
Also to note I created a 'status' field in tasks1 list that has a choice/drop down menu of Approved or Rejected.

Now what I want to do is the following, but not sure how to do it:
When person changes the status field on the document in tasks1 to either approved or rejected the item is coped either to the respective list 'Approved or 'Rejected' and the document in pending and tasks1 is deleted. I've tried a few commands but cannot get it to work. What actions/conditons should I be using.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
sorry, forgot to add, any help would be highly appricated
Top Expert 2010
Commented:
you'll want to simplify the condition.  here's one way to do it...

if status = approved
then copy item in this list to Approved list.

else if status = rejected
then copy item in this list to Rejected list

then create another step which says:
if status = approved
then delete item
else if status = rejected
then delete item

you'll also want to make sure the workflow runs when an item is updated... because that's how it will know to check for the status change.

what will happen:
when the item is updated, the workflow will run and check the status column.  if it's approved or rejected, the workflow will copy the item to the other list and then proceed to step 2 which deletes the item.  however, if the status in the first step is not equal to approved or rejected, the workflow will exit.
I would do this a bit differently so I'll chime in my option.  

Create a workflow attached to the Pending list and have it start when a new item is created. Have that workflow Collect Data from a User asking for approval or rejection. The workflow will automatically create a task for the user you assign (or group if you want, but it will be complete when the first person completes it) and pause until that task is completed. The Collect Data from a User action will output a List Item ID type variable which you will need for comparison.  I know it seems like it should just give you the approved/rejected result, but this process can be used to ask multiple questions at once. Since you'll be using the task list you will get all the advantages of notification and tracking that are inherent.

Next you'll use the logic that zephyr described, but a tad bit different.  You're going to compare the review status (your question) of the item in the tasks list which has the ID that matches your output variable. If that sounds confusing it is okay, once you see how the logic works it will make sense and you will use this logic often.  More details and pictures here: http://office.microsoft.com/en-us/sharepointdesigner/HA102098081033.aspx 

The only tweak I would make to the steps is after the step that makes the comparison and copies the item, just have the next step delete the item. It doesn't matter where the item went to (approved or rejected) and it just need to be removed from pending.

Author

Commented:
Worked a treat

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial