sharepoint-onlinepower-automatesharepoint-list

How to add Power Automate flow trigger condition IF a specific SharePoint List column has been modified in any way?


I want to add a Power Automate flow trigger condition which equates to the following logic:

IF column_X has_been_modified THEN run_the_rest_of_the_flow

Here are the official docs on Power Automate trigger conditions:

https://learn.microsoft.com/en-us/power-automate/triggers-introduction#customize-a-trigger-by-adding-conditions

https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-actions-triggers

The impetus for the development of trigger conditions was to reduce the number of flow runs by adding a 'condition' to the trigger - so that the flow only runs when certain conditions are met.

For example, in pseudo code:

IF insert_your_logic_here THEN run_the_rest_of_the_flow  

In regard to specifying the condition:

I have found a partial solution here:

https://powerautomate.microsoft.com/en-us/blog/run-a-flow-when-a-sharepoint-column-is-modified/

The solution has two steps:

  1. When an item or file is modified

  2. Get changes to an item or file (properties only)

The action outputs helpful tokens such as “Has Colum Changed:” that can be used to filter your flow to just the column(s) you care about

However, the problem with this solution is that it still requires that the flow runs in order to determine if a particular column has changed.

Question:

How can I combine both of these solutions so that:

Note that the TRIGGER CONDITION should catch ANY modification - not just a change to a known value.

Possible Workaround:

In the interests of demonstrating research...

This video shows a workaround which is summarised below.

However, I would prefer an out of the box solution without the need for creating an additional column.

Create an additional column in your list, eg:

ColumnOfInterest <---------- original column   
  
ColumnOfInterestCOPY <------ copy of column  

The value of ColumnOfInterestCOPY must initially match the value of ColumnOfInterest.

In pseudo code, the trigger condition is:

IF the value of ColumnOfInterest IS NOT EQUAL TO ColumnOfInterestCOPY:

In real code, the trigger condition is:

@not(equals(triggerOutputs()?['body/ColumnOfInterest'], triggerOutputs()?['body/ColumnOfInterestCOPY']))

At the end of the flow do an Update item to change the value of ColumnOfInterestCOPY to whatever value ColumnOfInterest was changed to. So the values will then be the same again, and the flow will only be triggered IF ColumnOfInterest is changed.


Solution

  • Unfortunately, there is no out of the box solution available for your requirements as Power automate flow trigger outputs or body (based on which we write trigger conditions) does not provide any information related to if column value has been changed or not.

    So, you will have to use either of the workarounds you already mentioned in your question:

    1. Let flow run > Get changes to an item or file (properties only) > continue the flow or terminate the flow based on if column value has been changed or not. OR
    2. The workaround you mentioned by using additional column to keep the track of column value to check if it has been updated or not.