cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to differentiate created and modified trigger in MS Flow?

Hi All,

As everyone suggested, I check 'Created' eq 'Modified' to differentiate created and modified trigger, it is working only if the SP list item does not have an attachment. When the user adds an attachment to the list during item creation, created and modified time is not the same. 1-sec difference occurred Created:2020-08-05T22:43:45Z and Modified: 2020-08-05T22:43:46Z. Thoroughly checked many times. Now, How to differentiate created and modified trigger in MS Flow when there is an attachment in the SP list.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to differentiate created and modified trigger in MS Flow?

Hi @samtim ,

 

You could check the if created is greater than the modified-10 second, if yes, that means the item is new created, if not, it means the item is modified.

1.png

addSeconds(items('Apply_to_each')?['Modified'],10)

 

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
Highlighted
Super User III
Super User III

Re: How to differentiate created and modified trigger in MS Flow?

Hi @samtim 

 

You need to enable the version settings of your list.

 

image.png

 

Next in your flow you can get the version number to determine whether it create or modify. For create version number is 1.0

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Community Support
Community Support

Re: How to differentiate created and modified trigger in MS Flow?

Hi @samtim ,

 

You could check the if created is greater than the modified-10 second, if yes, that means the item is new created, if not, it means the item is modified.

1.png

addSeconds(items('Apply_to_each')?['Modified'],10)

 

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

Highlighted
Frequent Visitor

Re: How to differentiate created and modified trigger in MS Flow?

HI @abm , Thanks for the response. It didnt work because version no become 2 when flow triggered first time

Highlighted
Super User III
Super User III

Re: How to differentiate created and modified trigger in MS Flow?

Hi @samtim 

 

That's because the attachment treats as a modified operation.  

 

Could of options.

 

1. Treat version 2 as create but then you must always have an attachment when it creates the list record.

2. Check for version 1 then it's always create. so in this case no attachments.

3. Add few more seconds to created time and compare if its less than 10 seconds or so then create.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Community Support
Community Support

Re: How to differentiate created and modified trigger in MS Flow?

Hi @samtim ,

 

Have you take a try with my solution?

 

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.

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (5,191)