Automatically copy list data from one list to another list after 1 month
Asked Answered
B

6

5

I have list that having data stores dynamically once the infopath form has been submitted. I want to archive this data after 30 days of creation date of any data. can you please suggest how would i do this. see i can do this by workflow but how can i set the condition that once 30 days complete after creation of any list it will automatically copy into other list.

Bragg answered 22/12, 2010 at 10:27 Comment(1)
Please mark my post as answer if it helped you!Overstuffed
T
7

First I would want to question WHY you want to move it to another list?

Why not simply setup a view on your main list showing only records created in last 30 days :-

Created >= [Today]-30

(And yes, you can use Today in view filters)

Tyrant answered 27/12, 2010 at 19:42 Comment(1)
Looks like this is a perfect example of K.I.S.S... Pretty funny how we were all recommending timer jobs and console apps. :DDesjardins
O
3

The best way to proceed is to create a timer job and define the criteria (like when should it be running) while creating the job. We have a very helpful post by SharePoint MVP here on how to create custom jobs. Note, you can test the job and business logic for shorter duration and if it works fine, you can simply extend the job duration for 30 days.

Its very simple, all you have to do is to define your 'copying list' logic in the Execute method of job class. Good luck

Overstuffed answered 22/12, 2010 at 22:24 Comment(1)
I want to develop workflow in sharepoint designer that move data from one list to another after certain period and that is 30 days after creation of the list item.Bragg
L
2

I believe you can simply use standard out-of-the-box workflow activities to do this - no need for timer jobs or console apps.

Using SharePoint Designer, create a new workflow (New -> SP Content -> Workflow). Specify the list to attach the workflow to.

Specify that the workflow should start on item creation only.

In the first Step, add an action: Pause for duration. Make the duration 30 days.

Add another action: Copy list item. Specify the list to copy to.

Optionally: create a third action: Delete list item if you want the original item to be deleted from the original list.

And I think that's it :)

Laurencelaurene answered 27/12, 2010 at 14:12 Comment(2)
I've had bad luck with the "Pause for duration" workflow action (haven't tried it in a while though). Also, wouldn't the "Delete list item" action need to run on the 2nd list? Otherwise you're trying to delete the item the workflow is currently running on.Desjardins
Good point about the deletion, not sure what would happen! Yeah, the pause for duration action can be troublesome, usually depends on the schedule of your timer job service.Laurencelaurene
A
1

you have to crate a timer job which runs daily and move the items which are one month old

Alumna answered 22/12, 2010 at 12:34 Comment(0)
D
1

Potentially the easiest solution is to create a console application that you schedule to run on the SharePoint server (an alternative to creating a timer job).

Depending on how you want to archive the data, you could:

Desjardins answered 23/12, 2010 at 15:23 Comment(0)
H
0

There's a limit on number of items in a list of 5000 items and if you change this in administration you'll kill performance. There are perfectly valid reasons to want to archive old items off of a rapidly growing list. exceeds the list view threshold 5000 items in Sharepoint 2010

Hillaryhillbilly answered 9/10, 2013 at 13:46 Comment(1)
How is the 5000 item limit a factor in the original question?Dactylography

© 2022 - 2024 — McMap. All rights reserved.