SharePoint list item gets stuck after Update Item runs in PowerAutomate

Iron Contributor

I have a PowerApps app connected to a SharePoint list.

I have a button in the app that Patches several fields in the list, including the FlowTrigger field which get set to "Yes"

In PowerAutomate there is a flow using "When item is Created or Modified".

The flow trigger is configured to only fire if the FlowTrigger field is set to "Yes".

The flow performs its task (send an email), then uses Update Item to set the FlowTrigger field to "No".

This all works great.

 

Here's where the problem starts:

The next time I click the button in the app it correctly Patches the other fields BUT it doesn't set the FlowTrigger field to "Yes". Sometimes clicking the button more than once gets it to work, but mostly not -- the FlowTrigger field stays as "No".

 

I created a separate button that just Patches the FlowTrigger field to "Yes", but it doesn't work if Flow has already run once. It's like the FlowTrigger field gets stuck if it's been updated once by Update Item.

Any ideas?

2 Replies

@Jeffery Hallett Can you show us the

  1. formula you used in power apps to update the column? 
  2. expression you used in trigger conditions of power automate flow?

Also, check the run history of power automate flow to see how many times the flow is running after you change the column value to "Yes" every time using  button click.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap thanks for your reply.

Below is the Patch code. Each time I run this, the SIR_Type and SIR_Status fields update in the SharePoint list. The FlowTrigger only updates occasionally. According to the Flow history, the Flow runs successfully one time when the FlowTrigger field gets updated to "Yes". If FlowTrigger remains "No", the Flow doesn't run.

 

Patch(SIR, varThisItem, ({SIR_Type: SIRType.Text, SIR_Status: SIRStatus.Text, FlowTrigger: "Yes"})

 

Here is the Trigger condition in the Flow:

@equals(triggerOutputs()?['body/FlowTrigger'],'Yes')