0

I have a calendar list in which to post deadlines. I need a reminder to be sent out two weeks before the deadline, so I am trying to put in a retention policy. To measure the date to activate this retention stage I have created a calculated column that removes 14 days from the end time. This works fine, however, I cant see this column as an option to activate the retention stage. Am I missing something? Thanks.

3

No you're not. Retention policies won't recognise a calculated date even if it's set to date/time format.

A good way around this is to shift the date calculation into SharePoint Designer. Use the "Add Time to" action to subtract 14 days (-14) from your deadline day and output this to a variable. In the next step, pause the workflow until then and your workflow will wait until then to trigger.

You'll have to compose the email also in the last step but I've always found this an effective workaround.

  • Quick question: Is this best practice even for a list with hundreds of items? I'm not doubting you, just want to make sure I wont be causing other issues! – Charles Baker Feb 14 '13 at 8:57
  • The community will be able to answer that one from thier own experiences I hope. I've used this in high volume lists myself with no real concerns. – Steven D Andrews Feb 14 '13 at 9:05
  • This seems to work really well. Thanks for your help. – Charles Baker Feb 26 '13 at 14:17
  • 2
    What will happen if someone modify the deadline later? Will the pasued workflow aware the change and update this parameter? – Mark L Jul 30 '15 at 8:30
0

Another idea is to make your Information Management Policy look at the (Created Date + 0 Days) and then start a workflow, and recur every day.

Then make your workflow read your list calculated column dates.

Workflow

Policy

0

Another solution would be to use the combination of PowerShell, and Task Scheduler on the SharePoint Server to run a workflow against every item in the list each day. You can use a similar workflow to the one in the attached screenshot.

$WebURL = "https://WEBURL"
$ListName = "LIBRARY NAME"
$WorkflowName = "WORKFLOW NAME"

$web = Get-SPWeb -Identity $WebURL
$manager = $web.Site.WorkFlowManager
$list = $web.Lists[$ListName]
$assoc = $list.WorkflowAssociations.GetAssociationByName($WorkflowName,"en-US")
$data = $assoc.AssociationData
$items = $list.Items
foreach($item in $items)
{
    $wf = $manager.StartWorkFlow($item,$assoc,$data,$true)
}

$manager.Dispose()
$web.Dispose()

enter image description here

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.