cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samtim
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
v-alzhan-msft
Community Support
Community Support

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

6 REPLIES 6
abm
Super User
Super User

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 blogPower Automate Video Tutorials
v-alzhan-msft
Community Support
Community Support

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

samtim
Frequent Visitor

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

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 blogPower Automate Video Tutorials

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.

Alice, it seems to work. 

Pls help with two questions: 

 

1. Why if created is greater than the modified-10 second, that means the item is new created?  

2. addSeconds should be -10, instead of 10? 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,244)