Timothy J Stewart on Wed, 21 Feb 2018 16:10:27
I have a loop workflow and it's skipping one of the approvers in the list.
I logged out (log to history) and found the issue, but still can't figure out why my variable:index is so large for this approver. The workflow only proceeds with a task for the approver if "variable:index is less than variable:count". Variable:count is the number of approvers the workflow will task out. Variable:index I can't figure out where it's getting this integer. Any suggestions?
Timothy J Stewart on Wed, 21 Feb 2018 19:11:00
What would be my "variable:index" value coming from? How can I figure this out? It's set to 0 to loop through approvers each time, but when I "Call HTTP Web service" the value changes for each approver, but I'm not sure where it's pulling "variable:index" from
Dean_Wang on Thu, 22 Feb 2018 06:20:04
Could provide a screenshot about your workflow steps here? It’s hard to help you without any information.
Here is a demo about how to loop through list items using designer workflow for your reference:
In the demo, the index is set as index plus one after each loop till index value equals to variable:count.
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Timothy J Stewart on Thu, 22 Feb 2018 13:45:39
Yes this is exactly how I've setup my workflow, but the variable:index shows up for a very high integer for one of my approvals, not allowing the workflow to proceed to assigning a task for this approver. Below are some screenshots:
Timothy J Stewart on Thu, 22 Feb 2018 13:48:42
It breaks down for my CFO approval task at "Loop:Iterate Through Approvers", the index is larger than the count (count being number of approvers, index not sure where it's getting such a high integer 8)...
if I set the index to 0 right before this workflow stage (Loop:Iterate Through Approvers), then it routes to CFO, but I'm not sure if I've broken something else in the loop by doing this workaround. I'd like to understand where my variable:index is
coming from and why it's oddly high for this one approver...
Thanks for the help!
Timothy J Stewart on Tue, 27 Feb 2018 16:11:39
Updated logging (logging variable:count, variable:index at the start of "Retrieving Business Approvers" Still unsure where my variable:index is pulling from within my rest end point, See below:
Timothy J Stewart on Fri, 02 Mar 2018 16:11:14
Getting closer, when I log comments for the tasks... I can see it's pulling them from the variable:index as if variable:index is the task and all it's columns. if variable:index is my approver task, what would be the number associated with this variable?