Skip to main content

Hello Everyone,

I am working on a WF where user wants to copy the items to an archive list which are modified+100 days old. This WF should run every day, copy items to the archive list who's status="Complete" and also delete that item from the main list. As per my understanding we can't achieve this using list workflow, have to go for site WFs. Can somebody please help me in building this WF?

Thanks in Advance!

Cheers,

Shreedhar H V

Hi,

if you are on SharePoint on-premises you could do that also with a list workflow activated by a retention policy.

Otherwise the best thing to do is a site workflow that will query your list to find all the items with status Completed and modified date equals to today + 200. You have to store the result in a collection variable and loop on it to copy the item and then delete it.

Giacomo


Hello Giacomo,

Thanks for the quick response!

You have mentioned to query the items which are modified+100 days old. How can I do that? Do I have to create calculated column to to those items?

And also how can I make use of collection variable to copy the items?

Thanks again!

Shreedhar H V


Hello Shreedhar,

Create a site workflow so that you can schedule it to run on daily basis.

Inside the workflow use Query list action where you can filter the data based on your requirements (status = completed and modified is older than today - 100 days). Save items ID's in a collection variable.

Next Loop though this collection variable and copy that list item to Archive list and delete the item from main list.


Hey Shreedhar,

I got some time so developed a quick dummy workflow for your requirement.

Workflow:

Calculate Date: here Today is a workflow variable with default value of todays date, and LastDate is also an empty date time variable.

Next Query your list with with filtering date and save the resulted items ID's in a collection variable.

Then loop through the this IDColl variable and copy the item to your destination list.

Copy Item action:

And followed by the Delete Item on the main list:

Workflow variables are:  Take Today variable as Date and Time with default value Today's date.

Hope this helps! Happy Nintexing..

Soni


Hello Soni,

Thanks for your response!

I have a question here! I am filtering on two conditions

  • Status = Completed
  • Modified = Modified + 100 days items

How can I pull this two conditions on For each loop? Please correct me if I am wrong, as of I know we can pull only one variable at a time.

Is there a way to achieve this?

Cheers!

Shreedhar H V


Hi Shreedhar,

you could put all these conditions inside the query list action (Soni's third screenshot) by adding an addition filter rule to query for Status = Completed (the condition on modified date is already in the screenshot), in that way the query list will return you only the list of Item IDs of desidered items.

Giacomo


Hey Shreedhar,

These conditions will be added at Query List action. See my screenshot for Query List action. I have added only modified <= LastDate (variable) You can click on add filter and add one more condition for Status = completed. Then you will loop through these results. Hope this gives you the clear picture, if not ask us where you stuck we will try to help!

Soni


Shreedhar, I added my previous workflow with screenshots of all actions included in the workflow, so that you can easily understand. See if it helps!

Soni


Thanks a lot Giacomo for all your help and suggestions! happy.png


Thanks a lot Soni! I am able to meet my requirement using the steps provided by you!

Thanks a lot again happy.png

Cheers


Glad to here that you got the solution happy.png
Happy Nintexing!!


Thanks a lot for the detailed description. This helped me and does exactly what I needed/wanted to accomplish. I like this community!


Reply