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.
To add this flow action, go to Next step -> search for Get items (under SharePoint) in the search bar > click on that. Here select the SharePoint Site Address and then the List Name. Here choose the SharePoint Souce list from where you want to copy the list items.
On the home page, add a new list by clicking the “New” button on the menu and selecting the “List” option. Then, select the option to create a list from an existing list. Simply select the site and the specific list you want to copy and click the “Next” button. You will then have to enter the name for the list.
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)
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
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 :)
you have to crate a timer job which runs daily and move the items which are one month old
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With