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

Run Flow when Sharepoint list item is created and when only certain Sharepoint list columns modified

I have a flow that I need to run when a Sharepoint list item is created or modified but in that same flow I need to update one of columns causing an infinite loop. Is there a way to specify that I only want the flow to run if certain columns in the Sharepoint list is modified and when any item is created in that list? 

 

Here is the list:

kramer_0-1669945058536.pngkramer_1-1669945106615.png

 

So in the flow I need to update the Event Status Column, but still need to run the flow anytime an item is created/modified to that list (Which event status default to Waiting for first approval when item is created). But if the Event Status is modified I don't need to run the flow again. Any help with this is greatly appreciate? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @kramer 

 

You can add an action named Get changes for an item or a file (properties only) under the trigger, this action can return whether a column has been changed.

vliweimsft_0-1669951359181.png

 


You can add a condition when:
1. Whether a specific column is modified:

vliweimsft_1-1669951372130.png

 


or
2. The modification time is equal to the creation time (proving that the current item is newly created and not modified):

vliweimsft_2-1669951386995.png

 


Terminates the stream if the condition is not met.

 

Best Regards,

Levi

View solution in original post

8 REPLIES 8
Alex_10
Super User
Super User

@kramer 

 

your flow updates only 1 column (Event Status Column) and that column is a single choice column?


If yes, you may add a Condition action in your flow.

Left value of the condition: triggerOutputs()?['body/YourEventStatusColumnInternalName']?['Value']

Middle: is equal to
Right value of the condition: "YourUpdatedStatusName"
 
then place Update Item action into 'If no' branch. 'If yes' branch is empty.
 
 

 

 

 

 

Unfortunately , It isn't a Boolean. There are 4 different options.

 

kramer_0-1669949306435.png

 

Sorry I may have misunderstood that. This is what I have now 

 

kramer_0-1669950413521.png

 

Ok so I changed it to this but it is still saying I am going to have an infinite loop

 

kramer_1-1669950612108.png

Unless I have my condition wrong? Is this correct for that if statement you mentioned aboved ?

triggerOutputs()?['body/EventStatus']?['Value']
v-liwei-msft
Community Support
Community Support

Hi @kramer 

 

You can add an action named Get changes for an item or a file (properties only) under the trigger, this action can return whether a column has been changed.

vliweimsft_0-1669951359181.png

 


You can add a condition when:
1. Whether a specific column is modified:

vliweimsft_1-1669951372130.png

 


or
2. The modification time is equal to the creation time (proving that the current item is newly created and not modified):

vliweimsft_2-1669951386995.png

 


Terminates the stream if the condition is not met.

 

Best Regards,

Levi

Would you still get the warning because I am still receiving that

v-liwei-msft
Community Support
Community Support

Hi @kramer 

 

If the field you update in the update item is not the field you want to trigger the flow, you can ignore the warning.

 

Best Regards,

Levi

v-liwei-msft
Community Support
Community Support

Hi @kramer 

 

So sorry I just found out I posted the wrong info in my last comment.
I have changed my last comment.
Sorry again.

 

Best Regards,

Levi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,405)