Date review Workflow only sending one alert

  • 13 November 2017
  • 1 reply
  • 0 views

Badge +10

I'm trying to set up a Workflow where a user gets alerted when the date in a Start Date field has hit 7 days in the future.

I've followed this blog which has worked up to a point. It's sending just one alert out for the first item/form in the library. 

For the purposes of testing I've set the site workflow to run every hour and I've set the Calculate date action to add 20 minutes to a Check Date.

Calculate Date

I think this issue I'm having is with the For Each and Query List actions.

I've set up a CollectedHRDates Collectable which I've targeted it in the For Each action and stored it in a ListItemID variable.

For Each

 

On the Query list action I've set the Filter as and output as below:

This is the email alert I'm getting showing the Check Date output as 11/13/

This is the library with the multiple forms

Library

So why am I not getting alerts for each item? The fact that 20 minutes has elapsed since the form was submitted should trigger an email for all items shouldn't it?

Should the filter in the Query list be 'Show the items when column Start Date is equal to Check Date'?

Any help appreciated!!


1 reply

Userlevel 3
Badge +12

Hi,

Your approach with site workflow is correct, just do the below math and filter items based on that.

1. Create a date workflow variable, dtSendAlert.

2. Calculate Date action --> Current Date - 7 days and store it in variable, dtSendAlert

3. Query List action --> Filter --> if "Start Date" < dtSendAlert, store required filed output in a "collection variable"

4. For Each action - Loop thru collection variable and "Send Notification" for each item in collection variable.

Testing:

It looks "Start Date" is custom date field, update this value to less than 7 days from today's date for couple of items, and run site workflow.

Thanks,

Krishna.

Reply