Skip to main content

Hello Need your help again!

I'm trying to update a field within a "For Each" action. I can't seem to get it to update.

 

I have a

Query Action - Collecting my filter results

For Each - Update the field I need to update for all the ID's in the collection action

I add a log history and see that it looks at each item but the field does not get updated.

 

Any ideas?

Hi Melissa,

Add Commit Pending changes after the Update action. Do you have safe-looping enabled or not?


Add the Commit Pending Changes that didn't work. and I'm not sure if I have safe looping as I do not have access to central admin


Safe Looping already enabled


As a test, create the Update Item action outside the loop and then hard-code the ID in the lookup to update the field. See if that works. You shouldn't have to run For-Each every time you want to test.


Thank you Kapil for taking the time to answer

I'm new to looping just started using it on this project.  The requirement is a email enabled Library List.

Emails come in with attachments as you know they an email with a attachment will have the same subject as the email it came in with.

So i'm collecting all ideas that have the same email subject as the current Item. This works I see that it looks up the correct number of items. Then I do a for each placing the collection ID in a List Item Variable. From there I was updating a field within the for each.

I'm not sure how to hard-code the ID.

Melissa


Hi Melissa,

have you tried using the Update multiple items action? This could spare you the for each.

If this does not work, could you please post a screenshot of your workflow, with the configuration of the Query items and Update item actions?

Martin


Thanks Martin! Added the Update Multiple Item action didn't seem to help

In the Collection Query - I have a filter look for all of the email that equal the Current email and store them in to CollectionID (works fine)

For Each - Target Collection is CollectionID Store in LidItemID

Update fields and then create a hmtl table.  The HTML looks perfect all of the fields update properly. On the list however they do not update properly so for example if 2 ID are collected the first updates but the second does not in the list.

For_Each_Nintext_Question.png


Please let us know if this issue was resolved. Please mark the appropriate answer as correct to help others in the community.


Reply