cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
muralikrishna00
Level: Powered On

how to check if item is edited or new item

flow reqiirements.png

Hi friends,

we have a requirement on sharepoint list.

we need to write a flow for above requirement.

1. When user add an item flow has to trigger an email for approval.

2. In between approvals, if user edit the item flow has to terminate no more action required from approvals

 

I have completed some part till send aprovals emails,

but dont know how to check if item is edited/modified then terminate flow instance.

kindly help me

 

Thanks,

Murali 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: how to check if item is edited or new item

Hi @muralikrishna00 

 

Currently there is no direct way of cancelling a flow like that. You can use the terminate action but then depends on the scenario that you are trying to build. For example: Trigger: When an item is created-> flow is running. Maybe in between you can add a delay and use the get item action to get this item and check the modified vs created date and then use the terminate action to kill the flow. makes sense? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Community Support Team
Community Support Team

Re: how to check if item is edited or new item

Hi @muralikrishna00 ,

 

As @yashag2255 said, there is no any way to close a flow when it has run.

 

Best regards,

Alice       

 

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

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: how to check if item is edited or new item

There really isn't a way to check whether something has been re-edited while the Flow is running. You can check if an item that triggered a Flow is new or edited by comparing the Created and Modified dates.  If they are the same then its new, otherwise its edited. But that would be in a different Flow and there would be no way to cancel an existing Approval in a different Flow from that Flow.



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

Re: how to check if item is edited or new item

First of all Really thanks for your reply,

 

"You can check if an item that triggered a Flow is new or edited by comparing the Created and Modified dates.  If they are the same then its new, otherwise its edited"

 

Ok it seems really good idea.

But 

after comparison can i stop current item instance ..?

Example 

New item is added 

Approver 1 is approved 

Approver 2 is approved 

Approver 3 is Pending(Not yet)

In this case can we terminate/stop/cancel the item flow instace ...?

means when approver 3 is couple of days back to approve (opned link) by any chance can we get error or no task list to approve since he modified.

kindly reply with your idea here if possible just give me a flow(attach that flow image) that make sence to me follow.

Thanks,

Murali krishna.

Dual Super User
Dual Super User

Re: how to check if item is edited or new item

Hi @muralikrishna00 

 

Currently there is no direct way of cancelling a flow like that. You can use the terminate action but then depends on the scenario that you are trying to build. For example: Trigger: When an item is created-> flow is running. Maybe in between you can add a delay and use the get item action to get this item and check the modified vs created date and then use the terminate action to kill the flow. makes sense? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Community Support Team
Community Support Team

Re: how to check if item is edited or new item

Hi @muralikrishna00 ,

 

As @yashag2255 said, there is no any way to close a flow when it has run.

 

Best regards,

Alice       

 

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

View solution in original post

Dual Super User
Dual Super User

Re: how to check if item is edited or new item

YOu can set a timeout on the Approvers and take action after that timeout fires.  But as I said, there is no way within that Flow running the approval to know that the document has been modified. When a trigger fires, yes you can compare the dates and terminate the Flow if its not a new document. But this would be in a different Flow than the original one sending out the Approvals. So I don't think that will be of any use to you.



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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 174 members 5,740 guests
Please welcome our newest community members: