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

For Each Loop Quits Early

Hi Folks,

I have a site workflow that has a for each loop in it. The loop looks in a list and checks to see if it should create a document in a library for the list item. It used to work well but since we upgraded to SharePoint 2013 when it runs, it quits after 4 loops. We must restart it ever 4 iterations. Any idea why this would happen?

Thanks!

Patrick

Labels: (2)
Tags (2)
0 Kudos
Reply
19 Replies
Highlighted
Automation Master
Automation Master

Re: For Each Loop Quits Early

I've seen loops end early after looping through hundreds of items, but not after 4. Is there something in the collection that it is looping with a blank/null/unexpected value?

Reply
Highlighted
Nintex Newbie

Re: For Each Loop Quits Early

I agree with @Andrew.  Is there any error messages displayed?  What assignments happen inside the for each loop?

Reply
Highlighted
Automation Master
Automation Master

Re: For Each Loop Quits Early

Hello,

What version number are you on?

Thanks

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: For Each Loop Quits Early

No, I do not think so. We filter the lookup for the loop on the pertinent data so that should not be an issue. Besides, the very predictable 4 and no more behavior would seem to rule out the randomness of ragged data.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: For Each Loop Quits Early

Nintex Workflow 2013        

© 2014 Nintex. All rights reserved.

Version: 3.1.4.11 - English

Reply
Highlighted
Automation Master
Automation Master

Re: For Each Loop Quits Early

Thanks - within your For Each action you aren't setting the "Stop Processing" field are you?   This would cause a short cut to the end early if the condition is met.

Reply
Highlighted
Automation Master
Automation Master

Re: For Each Loop Quits Early

The other item I will ask now is - how many items are in the collection you are iterating over?  You can log out the Count by doing a Collection Operation to make sure 4 items to loop on.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: For Each Loop Quits Early

Good thought Mike M! I just checked and no, that is not configured.

Reply
Highlighted
Automation Master
Automation Master

Re: For Each Loop Quits Early

What I mean is, check the count inside the collection.  The query you are doing that fills the collection prior to entering the For Each may have changed in the number of results it is returning.   Hence the sudden change of iterations.

Reply