Power Automate running multiple times when Sharepoint record changed

1.2k Views Asked by At

I have a Sharepoint list in O365 which is used to capture records from an SQL database through a Power Automate flow.

This works.

I have a second flow which is triggered when a record (specifically one field) is modified. This then pushes data back to my database.

This also works.

The problem I have is with the 2nd flow, which runs as many times as I have columns. So if I have 10 columns it runs 10 times, if I have 3 (tested a similar process but without the SQL update in my Dev environment) it runs 3 times.

Does anyone have any idea why this might be happening, or how I can prevent it?

Start of

The formula in the 'since' fieldis this:

sub(int(triggerOutputs()?['body/{VersionNumber}']),1)

Compose and condition

Final Action (SQL Removed)

Results of modifying 1 field

Results

1

There are 1 best solutions below

0
jimas13 On

In order to recap our conversation in the comments section.

It is possible to control Flow Execution by utilizing the trigger of the Flow connection and setting a logical calculation based on which, if it evaluates to True then the Flow will execute and if it evaluates to False then the Flow will disregard the trigger event and not execute.

You can view examples of the above practice in the link where a trigger is set to

@equals(triggerBody()?['Vendor'], 'Dell')

and a visual representation is below:

Settings for 'When an item is created or modified'

This results in a controlled execution of the Flow, when the change event has the Vendor column set to Dell