Site Workflow to move all list items in multiple librarys

I looking to create a site workflow (probably scheduled) that looks at a expiry date in a field and if this date is greater than today it moves it into an expired folder. The workflow needs to scan a few folders on the site.

I want to avoid (if possible) to have the workflow field being created on the list item - as all libraries on the site must have exactly the same column set up.

Has anyone experience of this or could they point to a reference?

Hi,
Thank you for the message.

You may use "Get Items by Query" and "Move Document from Library" actions.
You may find the example for one folder below:


Variable
Properties
Filter
Lookup
CopyProperties

Best regards
Evgeniy Kovalev
Plumsail Team

1 Like

Thanks for your reply. But can I get this to work over multiple libraries?

ie I need a workflow to run through our “Approved Contracors List” and “Contractor Application List” if any of the files meet the criteria then they are moved into the “Expired List”

I wanted this to be in one workflow as I need all items in all libraries to have identical columns.

(I have another list workflow that moves items from “Contractor Application List” To “Approved Contracors List” and as such already has a workflow status column)

Does this make sense?? :smiley:

You may build the dictionary from JSON string which will contain names of your libraries and add another loop based on this dictionary.
Please look at the example below:

Best regards
Evgeniy Kovalev
Plumsail Team

Thanks for your reply - I’m sorry, i’m new to this!!

I’m getting a warning on one of the lines:

I would post the image but i’m not allowed!! but its on the line
move document from … in loop2. Is says this action has a parameter missing. (however the properties look the same as yours)

Also - a general question if a field has a space in the title should it be enclosed?

If you are using “Check for Errors” ribbon button in SharePoint Designer and receive the message “The workflow contains no error.” it is mean that you wrote the right workflow. You may publish that workflow and it will work.

Regarding fields with spaces in “Get Items by Query”, usually the spaces just need to be removed.
You may get more information about right names for fields by link (for example):
http://server/sites/testsite/_vti_bin/ListData.svc/LibName (You need to replace on your parameters in the link)

Best regards
Evgeniy Kovalev
Plumsail Team

Hi Im trying to follow your example. the first one (not the second). Sorry I can’t paste photos for some reason!

Im using a reusable query:

In the Get items by Query
My Library name is : Approved Contractors. Should I just type this in or should I type in the hyperlink that I see if I hover over it Approved%20Contractors/

In the filter section my filter column is: Supplier Approval Expiry Date - Again should I use this or the Supplier%5Fx0020%5FApproval%5Fx0020%5FEx.

Sorry for all the questions, but im desperate to get this working :slight_smile:

Hi,

In the "Get items by Query" action you are may using the "Approved Contractors" name for the library and
the "SupplierApprovalExpiryDate" name for the filter section.
Please look at the example below:

Also, you may get more information about right names for fields for the "Get items by Query" action by link:
http://{{The address of your site}}/_vti_bin/ListData.svc/ApprovedContractors

Best regards
Evgeniy Kovalev
Plumsail Team

That looks like what I have done, but I can’t get it to work.

I’ve just sent an email to the plumail email with images of the workflow I built as I can’t send images on the forum