cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Workflow to archive list items to another list on the same site

Jump to solution

Dear community,

I found various threads discussing this issues, but unfortunately I am still struggling to get this to work.

I have list tracking status of different items with multiple collumns and items. The list ist continuously growing and I am looking for a way to archive items that are no longer active.

I have created an empty copy of the Main list, and named it Archive.

One of the columns is called Enddate, and I would like to move weekly all items where "Enddatum = Today()-30" (i.e. days) to Archive; and then delete the items from the mainlist.

I tried creating a schedulded site workflow with "Copy Item" where Enddatum equals Today()-30 to Arhive, followed by "delete item". This would not work for me.

I am rather new at Nintex, and would appreciate the support!

Thanks

Labels: (2)
Reply
12 Replies
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Hi,

this shouldn't be too hard actually. Just create a site-workflow like this:

At first you have to calculate the date from which on items should be archived and store this in a variable (vArchiveDate)

Then query the list to get all items, whose end-date is less than the archive date.

Finally you loop over the list of IDs create a copy of the item and then delete the item.

Instead of deleting every item individually you could also use the "delete multiple items" action, which uses the same filter-setting as the query-list-action:

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Thank you for the quick and extremely helpful answer! 

As I am still a bit confused, I have a follow up question. 

How should I setup "for each" function? That is:

Target collection? 

Store result in? 

Index? 

I assumed that for the query I should create a new workflow variable (vColArchivelds). Hopefully this is correct!

Thank you again :)

Bests,

Paavo

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Hi,

here you go:

and just in case:

The Index of the loop-action is not needed in this case, so you can just leave that empy.

Please remember to mark my reply as helpful/correct - if appropriate.

Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Awesome! Thank you :)

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

don't forget to mark the answer as correct!

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Excellent!  

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

When I run this the newly created items on the archive list start the workflows from the original list. Is there are way to prevent that?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

Thank you so much!!! your post saved me and my time. Great post. :)

Reply
Highlighted
Nintex Newbie

Re: Workflow to archive list items to another list on the same site

Jump to solution

I know it is 1 1/2 year ago the solution was posted but I hope someone can help me.

 

I have a similar question and tried this solution but when I copy from List A to List B item 2 and 3 is overwritten with data from item 1...

 

I have a Task list (List A) which is connected to a Project list. In List A I have several look-up columns to the Project list. One of them is Project status. I want the workflow to go through List A once a month and copy/move all tasks with Project status "Closed" to my Archive list (List B) and then delete the task from List A. I have followed the above steps and started at "Query list". But as I wrote all items get the same data.

0 Kudos
Reply