cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Nintex workflow Foreach update item creting issue

Hi I have one workflow in that I have written Foreach which will update the list items based onitem in foreach.

I have "," sperate values, which I have spilt in colelction, Now I applied foreach on collection reading one by one value , and based upon the value I am updateing 1 item from diffrent list , for updating in where caluse I am giving value from varibale of foreach.

1st loop of foreach runs succefully  but  when loop runs 2nd time it fails and says updatiions fails. I have log the value from foreach, it is showing me correct value. I am not able o understand the issue.

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

Re: Nintex workflow Foreach update item creting issue

Try to add a "Commit pending changes" action in your foreach after the update action.

Hope it helps

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Nintex workflow Foreach update item creting issue

Which method are you using on the Collection, "get" or "pop"?   If you are using more than one collection and attempting to use pop, you have to be careful that your collections do not become unequal in length.   Also can you post any errors that you might be getting?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Nintex workflow Foreach update item creting issue

HI Suyog,

Could you please try this.

  • Add Pause for 5 minutes
  • Add  Commit pending changes.

This will let the SharePoint timer job time to process the Update items.

If the problem is still not resolved. Try this.

  • Add log to history and verify that foreach loop collection value values is printing the excepted value.
  • Cross check that item you updating does not have any unique constraint, e.g. ‘Name’ field is unique in list.

Thanks

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Nintex workflow Foreach update item creting issue

make sure the count of both collections are equal before doing the foreach.

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Nintex workflow Foreach update item creting issue

Did you resolve this with the advice given?

0 Kudos
Reply