cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CameronTCD
Helper II
Helper II

My 'Update SharePoint Item' within an 'Apply to Each' doesn't run

Hi

 

I'm having an issue whereby my Flow will run successfuly but still (for some reason) not run the 'Update Item' connector... which is the most important part of the Flow.

 

Any advice/suggestions would be greatly appreciated. 

 

OoHF0ts.png

 

6 REPLIES 6
Pstork1
Dual Super User III
Dual Super User III

Could you supply more detail on what is controlling the Apply to each and how your update item is configured?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 

 

I have provided two screenshots below.

 

Regards,

Cameron1.png2.png

 

Pstork1
Dual Super User III
Dual Super User III

I assume the id in your update is coming from the Get unique request ticket action before the loop.  If that's the case then the problem isn't that your update isn't running.  Its that the update runs each time the loop cycles and you are over-writing earlier updates.   So the only one you are actually getting is the last one in the loop, which is probably empty so it looks like the update didn't run.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @CameronTCD ,

 

Since you have configured Filter Query, Get items actions only returns items that match the criteria.

Apply to each 2 traverses the collection of items returned by Get items. If the body returned by Get items is empty, the action in Apply to each 2 will not be executed.

4.PNG

So there will be a situation you mentioned, you could check if the Body of Get items action is empty.

 

In addition, if the logic is to update the items filtered by Filter Query, the conditions configured in Condition seem to determine whether the collection returned by Get items is empty.

Like:

5.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft 

 

The 'get items' will always only gather one result. The only reason I can't use 'get item' is that the ID is not known. I use the filter query to filter it down to the list item that I'm looking for (the filter phrase is provided in the forms trigger.)

 

Further, the condition looks at a reply from forms: 

>>>

'Does the supplied data satify your needs?' then continues on from a Yes/No answer depending on the input received.

>>>

 

I want the resultant answer to result in an update of that sharepoint item to either mark the open/close column as required.

Hi @CameronTCD ,

 

Anyway, I think using Get items action is correct, I just analyzed why Update item action was not executed.

No eligible items are filtered out, so the Apply to each 2 action will not be executed because Body of Get items action is empty.

As for the content you configure in Condition, you can decide for yourself, they are not the reason why Update item action is not executed.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,405)