Does anyone know how (in Office365 Workflow) to loop through results of a Query List and for each item do a task (eg send an email). There doesn't appear to be collection variables or For Each in O365
Hi Geoff Pendleton
Here's a sample on query list & Get an Item from Dictionary in the Loop N Times. You can also extract additional fields from the Fields XML by using the Query XML.
It will need to be a combination of a few things. When you Query List you can store the output in a dictionary as Fields XML. You can also store the count of item. If you need the count of any dictionary at any given time you can use the Count Item in a Dictionary action. Use this in your Loop N Time action. Specifying the number of times as the count you had earlier. Then in the loop you can extract data from the dictionary Get Item from Dictionary action. Once you retrieve the data you want you can then put it in the Send an Email action within the loop.
Outstanding post, thanks Danny, it helped a lot.
How long should a workflow like this take to execute (approx.)?
We have problems with the execution time which varies between 90-180 seconds.
See my post What is the normal time a basic Nintex workflow on Office 365 should take to execute? .
Thanks for your reply!
In my testing, the cycle time is between 5 and 15 minutes. In O365 you have no control or info about what else is happening in the tenant.
Sent from my Windows Phone
Thanks for your response.
What do you mean by cycle time? Do you mean it takes 5-15 minutes for a workflow like this to complete?
Yes, when you factor in the time it takes to issue a task, complete the task, and close the workflow. I have a list query followed by a task so my test is longer. The query only takes a minute or so.
Retrieving data ...