cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

I think I'm lurching towards a resolution to this! Thanks for all the help! What I'm getting now is an alert on the first library item and then the Workflow errors at the For Each action.

I've set the For Each Action like this:

and the Query List action to this:

My reasoning is this:

1 In an earlier Query List action I query the StartersandLeavers library

2 Filter the results when Start Date is equal to Check Date (the variable where the Calculate Date results are stored)

3 In Output select the Start Date field and save the results to the CollectedHRDates Collection variable.

4. For Each action (as pictured). Target the Collected HRDates collection and store the results in foreachcollectedstarttimes Date and Time Variable.

5. Query List action (as pictured) the list is StartersandLeavers.

6. Filter Start Date is equal to CollectedHRDates

7 Output, Field Start Date to CollectedHRDates (do I need to create another variable to store the results? If so should it be a date and time or collection variable)

The desired result is that an email alert is sent out for every item in the list which now has a start date 20 minutes+ from the original input start date.

What do I need to tweak?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

Actually  ‌ reading over your answer I've disabled the first Query List action and I'm letting the Query List in the Loop do the work to see what that'll do...

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Configuring a Workflow to send an alert when days have elapsed

6. Filter Start Date is equal to CollectedHRDates

this is not going to work.

you can not compare whole collection, you should rather compare single collection elements. so you likely should compare to 'foreachcollectedstarttimes' variable.

as I tried to explain above, I would say your workflow should simply look like this

so, first add 20mins to the InputDate

next, query list for all items which's StartDate is greater then calculated InputDate +20mins. (I used greater  then, since you mentioned "20 minutes +")

since you want to compare including time ("20 minutes +") you can not simply configure query with query builder, since it by default setup the query that compares just dates.

to make it easier, you can start configuring the query within builder and setup the base structure ...

but then you will need to switch to CAML editor to manually add IncludeTimeValue="True"  clause.

configure the query to return all the fields that you will later need in send notification action (ID and Title in my example). store each result set into separate collection variable.

then you simply need to iterate over one of the returned collections with for each loop action

possibly pick values from the other returned collections

finally send a notification with collected values

and you're done

‌ 

Reply
Highlighted
Automation Master
Automation Master

Re: Configuring a Workflow to send an alert when days have elapsed

This is a nicely drawn out picture of what I explained above.  Thanks for taking the time to screen shoot it all

The concepts break down to this:

1)  You will want a single Query List action to gather your collections.

2) You will loop over this collection of IDs to act on each row that needs acted upon.

Important point:  You do not want to use Query List inside of your Foreach loop as that causes more traffic than necessary since you will already have your collections obtained from a single query list.

I know this may seem complicated but once you get the concept, it becomes much easier.    Use logging during your development to check your values - you can always remove it latter.

What you are doing is Querying to get your result set, looping over your result set, and performing an action on the items that need acted upon.   

Thanks

Reply
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

Thanks both, I'll give it a go...

Reply
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

What should the  InputDate +20mins variable be? I've set it as a Date Variable but then it's not showing in the Store ISO 8601 date string Field?

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Configuring a Workflow to send an alert when days have elapsed

single line text

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

Cheers, yes set that up as such in the meantime.

I'm setting the Coll_IDs variable as a List Item ID then the For Each Action like this:

and then when I come to the Collection operation action it's giving me the CollectedHRDates as the Target Collection but no options under the Index drop down?

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Configuring a Workflow to send an alert when days have elapsed

you have to create a numeric variable to be used as an collection index

Reply
Highlighted
Nintex Newbie

Re: Configuring a Workflow to send an alert when days have elapsed

Thanks! I'll give it a whirl and let you know what happens!

0 Kudos
Reply