SharePoint: Automatically Copying List Items to Another List
Introduction
We sometimes need to copy or rather, move items from one list or library to another. Usually such a function is necessary when we need to archive an item, and could come in handy when you come up against the dreaded SharePoint Online 5000 item limit.
This article describes the workflow specific to lists. List copying is only available in SharePoint 2010 style workflows, while document copying is available in both SP 2010 and 2013 workflow formats.
Creating the Lists
In order to copy items from one list to another, we will need two identical lists. In this example, let's create two lists named SendFrom and SendTo
- Create a custom list named SendFrom
- The list columns should be:
Name
Type
Title Single line of text ArchiveDate Date and Time - Save the list as a template. Name it SendFromTemplate
- Create a new list named SendTo and use the list template you just created above
Designing the Workflow
We will create a workflow that copies a list item based on an archive date, then e-mails the person who created the item, and finally deletes the item.
Go to the SendFrom list settings and create a SharePoint Designer workflow
Name the workflow ArchiveSendFrom
Workflow description: Send item older than x days from SendFrom to SendTo
Platform Type: SharePoint 2010 Workflow
Change the Start Options to include Manual, Created and Changed
Rename Step 1 to something appropriate, such as Send to Archive
Create a local variable named WaitForArchive-Date of the type Date/Time
Insert an Action by selecting Add Time to Date in the Utility Actions group
Change the following:
- Click the number 0 and change it to the interval you need
- Click minutes and change it to days
- Click the first date and change it to Current Item:ArchiveDate by clicking the fx button and selecting the ArchiveDate field
- Click on Variable date and change it to the WaitForArchive-Date variable that you've created
Note: Change the above parameters to shorter intervals for testing, such as 5 minutes rather than days.
Add a Pause: then Pause until Variable: WaitForArchive-Date
Insert a condition if necessary
Create the following actions:
then Email Current Item:Created By
then Copy item in Current Item to SendTo
then Delete item in Current Item
Save and publish the workflow