SharePoint Designer workflow: Move a document from one library to another
© 2008-2010 DocumentManagementWorkflowInfo.com - Read our Copyright Notice
Learn how you can create a SharePoint Designer 2007 workflow that can be manually started on a document to move that document from the SharePoint document library in which it is currently located to another document library on the same SharePoint site.
Scenario
You have a document on which you want to start a workflow that will move the document from one document library to another.
Solution
Moving a document using a SharePoint Designer workflow involves copying the document to the SharePoint document library you want to move the document to, and then deleting the document from the current document library it is in.
You can use the Copy List Item action to copy the document and the Delete item action to delete the document.
To create a SharePoint Designer workflow that can move a document from one document library to another:
- In SharePoint Designer 2007, open the SharePoint site on which the document library that contains the documents to move is located.
- On the File menu, select New, and then Workflow.
- On the Define your new workflow screen of the Workflow Designer, enter a name for the workflow, select the document library you want to attach the workflow to (this would be a document library containing documents to move), select Allow this workflow to be manually started from an item, and click Next.
- On the Step 1 screen of the Workflow Designer, click Actions, and then click More Actions from the drop-down menu.
-
On the Workflow Actions dialog box, select List Actions from the category drop-down list box, select Copy List Item from the actions list, and click Add. The following text is added to the Workflow Designer:
Copy item in this list to this list
- On the Step 1 screen of the Workflow Designer, click the first this list (representing the document library to copy the document from) in the text of the Copy List Item action.
- On the Choose List Item dialog box, leave Current Item selected, and click OK.
- On the Step 1 screen of the Workflow Designer, click the second this list (representing the document library to copy the document to) in the text of the Copy List Item action, and select the document library (this is the document library to where you want to move the document) from the drop-down list box that appears.
- On the Step 1 screen of the Workflow Designer, click Actions, and then click More Actions from the drop-down menu.
-
On the Workflow Actions dialog box, select List Actions from the category drop-down list box, select Delete Item from the actions list, and click Add. The following text is added to the Workflow Designer:
then Delete item in this list
- On the Step 1 screen of the Workflow Designer, click this list in the text of the Delete Item action.
-
On the Choose List Item dialog box, leave Current Item selected and click OK. The final text for the workflow should now look like:
Copy item in DocLib1 to DocLib2
then Delete item in DocLib1
where DocLib1 is the SharePoint document library containing the document to move and DocLib2 the document library to move the document to.
- On the Step 1 screen of the Workflow Designer, click Finish.
Testing the workflow
- Go to the SharePoint document library to which you attached the workflow, click on a document, and select Workflows from the drop-down menu.
- On the Workflows page, click the name of your SharePoint Designer workflow.
- On the workflow initiation page, click Start.
When the workflow completes, the document should have moved from the first SharePoint document library to the second document library.
Related Articles
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of the owner of DocumentManagementWorkflowInfo.com. The techniques demonstrated in this article may be used within any SharePoint project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the owner of DocumentManagementWorkflowInfo.com.
