I'm hoping someone can help me understand how to set up a query list and run if workflow. I've read similar posts but there not dumbed down enough for me to understand where mine keeps failing.
I have a list on a site called Report Schedule List. The list has a Report Name, Due Date and Report Owner columns. I have set up a site workflow to run once a day forever. What I'm trying to get the work flow to do is each day query the list looking for any date that equals today (I've created variables for the report due date and report owner) and for each item that is due on the day the workflow is run send the report owner an task.
I've created variables to capture the due date and report owner and collections for the same. I really have no idea what I'm doing.
I've attached my workflow in hopes greater minds can help me out.
Solved! Go to Solution.
I have inserted a number of images. The workflow, the query list set up, For Each set up and the Run If set up. The list of reports I'm pulling from as a number of reports that are due on the same day so I figured I need to collect the due dates.
could you post how have you configured filter in query list action?
regarless of that, I affraid there are few design flaws
- are you aware of that if you assign tasks in a loop, the loop will proceed to next iteration (so assigning next task) just after previous task is responded?
- you check for due date in runif action, I would say this condition/filter should be possible to move to query list. you will get much smaller dataset to process (only items that you realy need to take care about)
- I'm not exactly sure about datatypes of your variables, but from their names it looks like total misusage ...
query list - variables to store returned data should be collections. if they are not you will capture just first value out dataset returned by the query. if they are collections, then varDueDate should have been a target collection in follow-up for each loop action.
for each - as already mentioned, target collection should have been a (collection) variable populated by query list action. you configured here some new collection. not sure whether it is populated or but it seem to be unrelated to query list action
run if - you seem to compare scalar variable to a collection one. this can not work
I would highly recommend to search the forum for topics that deal with sending reminders from site workflow. they are very similar to your case
following Cassy Freeman' blogpost on Nintex Xchange™ is provided with downloadable example you can play/start with Document Review and Approval (State Machine) Workflow
Thanks so much for your help. This worked. Is it possible to query a list to look for due dates approaching in five days and send the task when the due date is five days away? I looked at the date calculation option but I'm lost.
I suppose I could just create another list column for the task assignment date but if you know of a more intelligent way of doing this it would be appreciated.
Hi Andrew Robinson,
Good you got the result.
And regarding to get the date of five days before from due date, you can't set a condition in the query list action itself.
First query the list and apply some filter condition to get your result set and after that if calculate date action is available in your Nintex version you can use it to get the required date.