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.
Solved! Go to Solution.
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.
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?
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.