0

We have a Document Set library, which holds our invoices. The library is getting very large (~70 000 items, currently. 32 000 different invoices.). The search in this library is getting rather slow, and we're looking at programmatically moving the document sets from one library to another.

We've got two fields that we want to base the move on: Invoice Date, and Invoice Status.

Invoice Date is a DateTime column which can be used through the Information Management Policy Settings in the library. We want to move the document sets on "Invoice Dates older than 13 months" or trigger the workflow/event on Invoice Date + 13 months

Invoice Status is a Choice column with a few defined options. We want to trigger the move when status is "Completed".

We'd like the document to get put into either another document set library, or another folder that's easily accessible if we need it to be, and only move invoices where the Invoice Date AND the Invoice Status meet our criteria.

The basic Information Management Policy Settings trigger only works with DateTime and you can't make a custom policy with it. Also there's no library connectable via the "Move to other location" option.

Any tips on how this can be accomplished? Some form of documentation would be highly appreciated. I'm somewhat comfortable with using C# or some other language if this has to be programmed directly.

0

You can easily do it with MS Flow,

  1. trigger flow in schedule, every hour, or how do you like
  2. Get items with query filter something like: dateField is lower than now - 1 year and contenttypeid equal yourdocumentsetCT
  3. Foreach items
  4. Move folders
1
  • There is a limit in Flow: 5000 iterations in foreach loop, but you can do it in 5000 item batches.
    – Bálint
    Apr 16 '19 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.