Vous êtes sur la page 1sur 3

Archive List Items in SharePoint 2010

This article explains how to set up an archiving process for a SharePoint list. An Issue Tracking List is considered in this example. What would we like to do? Define a process to manage aged items in the issue list by defining an action to be taken when an item reaches its expiration date. Example: XYZ Company is having an issue tracking list, which is used to manage several testing cycles. Currently, the issue list has several thousand items and has resulted in performance issues as the page rendering is slow. The performance is much slower for users who remotely login to the intranet. In order to improve the performance of the issue tracking list, the SharePoint Administrator decides to copy aged items to a new list. The criterion for copying items is as follows: Issue items created 90 days ago and having the issue status as closed will be copied. Additionally, the copied item will be deleted from the original list.

Prerequisites
To accomplish the above task, what do we need? (A) First, create a new list (destination) having the same columns and settings as the existing (source) list. (B) Second, create a workflow to copy items to the destination list and delete the item from the source list. After creating the tasks listed in the prerequisites, you can setup the Information management policy settings. (C) Define the event to initiate the retention policy and the action to be performed when the event is triggered. Let us discuss how to accomplish the above tasks.

(A) Create a new list


The new list should have the same columns and settings as the existing list. The quickest method to create a copy of an existing list is by using the Save list as template feature as it saves time in recreating the custom settings or columns you might have. This is a two-step process: (1) Save the list as a template; and (2) Create a new list from the saved template.

Save List as Template


1. Select the List tab and click List Settings. 2. Under Permissions and Management, select Save list as template. 3. Enter a File name for the template file. 4. Enter Template name and Template description. 5. Do not select Include Content checkbox. 6. Click the OK button to save the list as a template. The template is created and saved to the list template gallery.

Create List from Template


To create a new list from the template: 1. Click Lists in the Quick Launch region. 2. Click Create. 3. Select the template created. In this example, it is Issue Tracking Template. 4. Enter Name for the new list and click the Create button. We now a have a new list. Next, we will create a workflow to copy items to the new list (destination) and delete that item from the existing list (source).

(B) Create SharePoint Designer Workflow

The workflow will do the following (1) Copy issue items to the new list and (2) Delete issue items from the current list. 1. Open SharePoint Designer 2010. 2. Select File, Add Item and select List Workflow. 3. Specify name for the new workflow. 4. Specify the list to associate with the new workflow and click Create. 5. Click Insert in the Quick Access Toolbar, Condition, and select If current item field equals value. 6. Click field and select Issue Status. Click value and select Closed. Note: If you note the above condition, it only states that the issue status has to be closed. It does not specify the number of days lapsed since the issue has been created (for the item to be copied) as it is specified in the Information Management Policy Settings, explained later. Now let us define what action has to be taken. Here we define copying the item to a new list. 7. Click Insert in the Quick Access Toolbar, Action, and Copy List Item. 8. Click this list and select Current Item. 9. Click this list again and select the new list created (destination list) in the earlier section. Define deletion of the copied item. 10. Click Insert in the Quick Access Toolbar, Action, and Delete Item. 11. Click this list and select Current Item. A screen print of the workflow setting is shown below.

12. Save the workflow. We will now change the settings to trigger the workflow when an item is modified. 13. In the left pane, click on the workflow name. 14. Under Start Options, select Start workflow automatically when an item is changed. 15. Save and Publish the workflow. With the workflow settings in place, we will now define the retention settings i.e. what causes the retention stage to activate and what action is performed when it is activated.

(C) Information Management Policy Settings


SharePoint 2010 includes the Information Management Policy Settings feature, which can be configured to archive aged items. 1. Select the List tab and click List Settings. 2. Under Permissions and Management click Information management policy settings. 3. Under Content Type, click Issue. 4. Click Enable Retention checkbox. 5. Click Add a retention stage. Note: Until a retention stage is added the items will not expire.

6. Define the Event that causes the retention stage to activate. You can either define a time period or use a custom retention formula installed on the server. 7. Define the Action to perform when the retention stage is triggered. Refer to the above image for the type of actions that can be performed. Note: A workflow must have already been defined before you can define the Action. Refer to creating a retention workflow for details. 8. Under Start this workflow, select the workflow you created for the retention. Click OK. The below image shows the settings defined for the event and the action.

Note: In this example, the settings only define the time period for the event to be triggered. The other part i.e. the issue status has to be closed is defined in the workflow.

Vous aimerez peut-être aussi